class VrrpVif

Implementation of a VRRP network interface. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Types

Public Methods


Detailed Description

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:

vtthe VRRP target.
ifnamethe name of the physical interface.
vifnamethe name of the logical interface.
 ~VrrpVif ()

~VrrpVif

bool  own (const IPv4& addr)

own

Check whether an IP address is configured on this interface.

Parameters:

addrthe 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:

vridthe 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:

vridthe router ID of this VRRP instance.
void  delete_vrid (uint32_t vrid)

delete_vrid

Delete a VRRP instance from this interface.

Parameters:

vridthe 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:

confthe 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:

srcthe source MAC address.
dstthe destination MAC address.
etherthe Ethernet type.
payloadthe 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:

fromthe source IP address.
payloadthe IP payload.
void  add_mac (const Mac& mac)

add_mac

Add a MAC address to this interface.

Parameters:

macMAC address to add.

Reimplemented from VrrpInterface.

void  delete_mac (const Mac& mac)

delete_mac

Delete a MAC address from this interface.

Parameters:

macMAC 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:

srcthe source MAC address.
payloadthe ARP header and data.
void  get_vrids (VRIDS& vrids)

get_vrids

Obtain a list of VRRP instance configured on this interface.

Parameters:

vridsthe 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_errorthe error (if any).

Generated by: pavlin on kobe.xorp.net on Wed Jan 7 19:11:13 2009, using kdoc 2.0a54+XORP.