struct VrrpHeader

The VRRP header. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Types

Public Methods

Public Static Methods

Public Members


Detailed Description

enum Versions { VRRP_VERSION = 2 }

Versions

enum PktTypes { VRRP_TYPE_ADVERTISEMENT = 1 }

PktTypes

enum AuthTypes { VRRP_AUTH_NONE = 0 }

AuthTypes

VrrpHeader&  assign (uint8_t* data)

assign

[static]

Create a new VRRP packet. Caller must allocate memory and assert size (VRRP_MAX_PACKET_SIZE).

Parameters:

datapointer where packet should be stored.

Returns: the VRRP header.

const VrrpHeader&  assign (const PAYLOAD& payload)

assign

[static]

Parse a VRRP packet.

Parameters:

payloadThe VRRP packet starting with the VRRP header.

Returns: the VRRP header.

uint32_t  finalize ()

finalize

Must be called when all fields have been manipulated. This will setup the final bits of information (e.g., checksum) and the packet will become ready to be sent.

Returns: the length of the packet.

void  add_ip (const IPv4& ip)

add_ip

Add an IP address of the virtual router to the advertisement.

Parameters:

ipIP address to add to the advertisement.
IPv4  ip (unsigned index)

ip

[const]

Extract an IP address from the advertisement.

Parameters:

indexthe index of the IP (0..vh_ipcount).

Returns: the IP address at the specified index.

uint8_t vh_v

vh_v

uint8_t vh_type

vh_type

uint8_t vh_type

vh_type

uint8_t vh_v

vh_v

uint8_t vh_vrid

vh_vrid

uint8_t vh_priority

vh_priority

uint8_t vh_ipcount

vh_ipcount

uint8_t vh_auth

vh_auth

uint8_t vh_interval

vh_interval

uint16_t vh_sum

vh_sum

struct in_addr vh_addr[0]

vh_addr[0]


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