Public Types |
|
typedef set< uint8_t > | VRIDS |
Public Member Functions |
| | VrrpVif (VrrpTarget &vt, const string &ifname, const string &vifname) |
|
VrrpTarget & | get_vrrp_target () |
| bool | own (const IPv4 &addr) |
| | Check whether an IP address is configured on this interface.
|
| Vrrp * | find_vrid (uint32_t vrid) |
| | Look for a VRRP instance on this interface.
|
| void | add_vrid (uint32_t vrid) |
| | Add a VRRP instance on this interface.
|
| void | delete_vrid (uint32_t vrid) |
| | Delete a VRRP instance from this interface.
|
| bool | ready () const |
| | Check whether the interface is up.
|
| void | configure (const IfMgrIfTree &conf) |
| | Change the interface's configuration.
|
| const IPv4 & | addr () const |
| | Obtain the interface's primary IP address.
|
| void | send (const Mac &src, const Mac &dst, uint32_t ether, const vector< uint8_t > &payload) |
| | Send a L2 packet.
|
|
void | join_mcast () |
| | Join the VRRP multicast group.
|
|
void | leave_mcast () |
| | Leave the VRRP multicast group.
|
| void | recv (const IPv4 &from, const vector< uint8_t > &payload) |
| | Receive an IP packet.
|
| void | add_mac (const Mac &mac) |
| | Add a MAC address to this interface.
|
|
void | add_ip (const IPv4 &ip, uint32_t prefix) |
| void | delete_mac (const Mac &mac) |
| | Delete a MAC address from this interface.
|
|
void | delete_ip (const IPv4 &ip) |
|
void | start_arps () |
| | Start the reception of ARP packets.
|
|
void | stop_arps () |
| | Stop the reception of ARP packets.
|
| void | recv_arp (const Mac &src, const vector< uint8_t > &payload) |
| | Notify the reception of an ARP packet.
|
| void | get_vrids (VRIDS &vrids) |
| | Obtain a list of VRRP instance configured on this interface.
|
| void | xrl_cb (const XrlError &xrl_error) |
| | Callback on XRL error caused by this interface.
|
Private Types |
|
typedef set< IPv4 > | IPS |
|
typedef map< uint32_t, Vrrp * > | VRRPS |
Private Member Functions |
| void | set_ready (bool ready) |
| | Enable or disable the interface.
|
| template<class T > |
| bool | is_enabled (const T *obj) |
| | Check whether a rtrmgr configuration element (e.g., an interface) is enabled.
|
Private Attributes |
|
VrrpTarget & | _vt |
|
string | _ifname |
|
string | _vifname |
|
bool | _ready |
|
IPS | _ips |
|
VRRPS | _vrrps |
|
uint32_t | _join |
|
uint32_t | _arps |
Implementation of a VRRP network interface.
This class links the VRRP state machine to the actual network.