|
| ||||||||||||||||
This class links the VRRP state machine to the actual network.
| typedef set<uint8_t> VRIDS | VRIDS |
| VrrpVif (VrrpTarget& vt, const string& ifname, const string& vifname)
| VrrpVif |
Parameters:
| vt | the VRRP target. |
| ifname | the name of the physical interface. |
| vifname | the name of the logical interface. |
| ~VrrpVif ()
| ~VrrpVif |
| bool own (const IPv4& addr)
| own |
Check whether an IP address is configured on this interface.
Parameters:
| addr | the IP address tocheck for. |
Returns: whether the given IP address is configured on the interface.
Reimplemented from VrrpInterface.
| Vrrp* find_vrid (uint32_t vrid)
| find_vrid |
Look for a VRRP instance on this interface.
Parameters:
| vrid | the VRRP ID to look for. |
Returns: a VRRP instance configured on this interface.
| void add_vrid (uint32_t vrid)
| add_vrid |
Add a VRRP instance on this interface.
Parameters:
| vrid | the router ID of this VRRP instance. |
| void delete_vrid (uint32_t vrid)
| delete_vrid |
Delete a VRRP instance from this interface.
Parameters:
| vrid | the router ID of the instance. |
| bool ready ()
| ready |
[const]
Check whether the interface is up.
Returns: whether the interface is enabled.
Reimplemented from VrrpInterface.
| void configure (const IfMgrIfTree& conf)
| configure |
Change the interface's configuration.
Parameters:
| conf | the new configuration of the interface. |
| const IPv4& addr ()
| addr |
[const]
Obtain the interface's primary IP address.
Returns: the primary IP address.
Reimplemented from VrrpInterface.
| void send (const Mac& src, const Mac& dst, uint32_t ether,
const PAYLOAD& payload)
| send |
Send a L2 packet.
Parameters:
| src | the source MAC address. |
| dst | the destination MAC address. |
| ether | the Ethernet type. |
| payload | the data following the MAC header. |
Reimplemented from VrrpInterface.
| void join_mcast ()
| join_mcast |
Join the VRRP multicast group.
Reimplemented from VrrpInterface.
| void leave_mcast ()
| leave_mcast |
Leave the VRRP multicast group.
Reimplemented from VrrpInterface.
| void recv (const IPv4& from, const PAYLOAD& payload)
| recv |
Receive an IP packet.
Parameters:
| from | the source IP address. |
| payload | the IP payload. |
| void add_mac (const Mac& mac)
| add_mac |
Add a MAC address to this interface.
Parameters:
| mac | MAC address to add. |
Reimplemented from VrrpInterface.
| void delete_mac (const Mac& mac)
| delete_mac |
Delete a MAC address from this interface.
Parameters:
| mac | MAC address to remove. |
Reimplemented from VrrpInterface.
| void start_arps ()
| start_arps |
Start the reception of ARP packets.
Reimplemented from VrrpInterface.
| void stop_arps ()
| stop_arps |
Stop the reception of ARP packets.
Reimplemented from VrrpInterface.
| void recv_arp (const Mac& src, const PAYLOAD& payload)
| recv_arp |
Notify the reception of an ARP packet.
Parameters:
| src | the source MAC address. |
| payload | the ARP header and data. |
| void get_vrids (VRIDS& vrids)
| get_vrids |
Obtain a list of VRRP instance configured on this interface.
Parameters:
| vrids | the VRRP instances on this interface (output parameter). |
| void xrl_cb (const XrlError& xrl_error)
| xrl_cb |
Callback on XRL error caused by this interface.
Parameters:
| xrl_error | the error (if any). |