/* ****************************************************************************** * INTERPEAK API HEADER FILE * * Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipnet_vrrp.h,v $ $Revision: 1.3.10.3 $ * $Source: /home/interpeak/CVSRoot/ipnet2/src/ipnet_vrrp.h,v $ * $Author: jren $ $Date: 2015-02-28 08:46:30 $ * $State: Exp $ $Locker: $ * * INTERPEAK_COPYRIGHT_STRING * Design and implementation by Kenneth Jonsson ****************************************************************************** */ #ifndef IPNET_VRRP_H #define IPNET_VRRP_H /* **************************************************************************** * 1 DESCRIPTION **************************************************************************** * Implementation of RFC3768 - Virtual Router Redundancy Protocol (VRRP) * This file contains helper functions used within the stack. */ /* **************************************************************************** * 2 CONFIGURATION **************************************************************************** */ #include "ipnet_config.h" /* **************************************************************************** * 3 INCLUDE FILES **************************************************************************** */ #include #include #include #include "ipnet_neigh.h" #ifdef __cplusplus extern "C" { #endif /* **************************************************************************** * 4 DEFINES **************************************************************************** */ /* **************************************************************************** * 5 TYPES **************************************************************************** */ enum Ipnet_eth_vrrp_macaddr_type { /* Not a VRRP mac address */ IPNET_NOT_VRRP_MAC_ADDRESS = 0, /* an ipv4 VRRP mac address */ IPNET_IPV4_VRRP_MAC_ADDRESS, /* an ipv6 VRRP mac address */ IPNET_IPV6_VRRP_MAC_ADDRESS }; /* VRRP interface link up/down event cmd */ #define IPNET_VRRPD_INTERFACE_LINK_UP 1 #define IPNET_VRRPD_INTERFACE_LINK_DOWN 2 /* *=========================================================================== * Ipnet_vrrp_info *=========================================================================== */ typedef struct Ipnet_vrrp_info_struct { char ifname[IP_IFNAMSIZ + 1]; /* Interface name */ Ip_u8 event; } Ipnet_vrrp_info; /* * Link layer specific destructor for a VRRP address. */ typedef void (*Ipnet_vrrp_addr_dtor)(const Ipnet_neigh *); /* **************************************************************************** * 6 FUNCTIONS **************************************************************************** */ IP_GLOBAL Ip_bool ipnet_vrrp_vrid_active(Ipnet_netif *netif, Ip_u8 vrid, int domain); IP_GLOBAL Ip_u8 ipnet_vrrp_addr_vrid(Ipnet_netif *netif, void *addr, int domain); IP_GLOBAL int ipnet_vrrp_add_addr(Ipnet_neigh *neigh, Ip_u8 vrid); IP_GLOBAL int ipnet_vrrp_del_addr(Ipnet_neigh *neigh, Ip_u8 vrid, Ipnet_vrrp_addr_dtor dtor); IP_GLOBAL void* ipnet_vrrp_get_addr_with_vrid(Ipnet_netif *netif, Ip_u8 vrid, int domain); IP_GLOBAL enum Ipnet_eth_vrrp_macaddr_type ipnet_eth_get_vrrp_mac_addr_type(Ip_u8 *mac); IP_GLOBAL void ipnet_vrrp_kioevent(char *ifname, int event, int vr); #ifdef __cplusplus } #endif #endif /* **************************************************************************** * END OF FILE **************************************************************************** */