class Vrrp

VRRP protocol implementation. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods

Public Members


Detailed Description

This class implements the state machine of the VRRP protocol. It receive events and responds to them.

static const Mac mcast_mac

mcast_mac

 Vrrp (VrrpInterface& vif, EventLoop& e, uint32_t vrid)

Vrrp

Parameters:

vifthe VRRP interface on which this instance is running.
eeventloop.
vridthe VRRP id of this instance.
 ~Vrrp ()

~Vrrp

void  set_priority (uint32_t priority)

set_priority

Set the priority of the router.

Parameters:

prioritythe priority of this router.
void  set_interval (uint32_t interval)

set_interval

Set the advertisement interval.

Parameters:

intervalthe interval for sending advertisements.
void  set_preempt (bool preempt)

set_preempt

Set whether a high priority backup router should preempt backup routers with lower priority acting as masters.

Parameters:

preemptwhether a high priority backup should preempt a low one.
void  set_disable (bool disable)

set_disable

Stop or start this VRRP instance.

Parameters:

disablestop this VRRP instance.
void  add_ip (const IPv4& ip)

add_ip

Add an IP to the virtual router.

Parameters:

ipIP address to add to the virtual router.
void  delete_ip (const IPv4& ip)

delete_ip

Delete an IP from the virtual router.

Parameters:

ipIP address to remove from the virtual router.
bool  running ()

running

[const]

Check whether this instance is running.

Returns: whether this VRRP instance is running.

uint32_t  priority ()

priority

[const]

Obtain the priority of this router.

Returns: priority of router.

void  start ()

start

Start VRRP processing.

void  stop ()

stop

Stop the protocol.

void  check_ownership ()

check_ownership

Check whether the router owns all IPs configured for the virtual router. This must be called after updating IP addresses.

void  recv (const IPv4& from, const VrrpHeader& vh)

recv

Must be called when a VRRP packet is received.

Parameters:

fromIP address sending the packet.
vhthe VRRP packet received, starting from the VRRP header.
ARPd&  arpd ()

arpd

Obtain an instance to the ARP daemon.

Returns: an instance of the ARP daemon.

void  get_info (string& state, IPv4& master)

get_info

[const]

Returns information about the state of the protocol.

Parameters:

statethe state of the router (output parameter).
masterthe IP address of the master (output parameter).

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