struct VrrpHeader
|
The VRRP header.
More... |
|
|
Public Types
Public Methods
Public Static Methods
Public Members
enum Versions { VRRP_VERSION = 2
}
| Versions |
enum PktTypes { VRRP_TYPE_ADVERTISEMENT = 1
}
| PktTypes |
enum AuthTypes { VRRP_AUTH_NONE = 0
}
| AuthTypes |
[static]
Create a new VRRP packet. Caller must allocate memory and assert size
(VRRP_MAX_PACKET_SIZE).
Parameters:
data | pointer where packet should be stored.
|
Returns: the VRRP header.
[static]
Parse a VRRP packet.
Parameters:
payload | The 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:
ip | IP address to add to the advertisement.
|
IPv4 ip (unsigned index)
| ip |
[const]
Extract an IP address from the advertisement.
Parameters:
index | the index of the IP (0..vh_ipcount).
|
Returns: the IP address at the specified index.
uint8_t vh_priority
| vh_priority |
uint8_t vh_ipcount
| vh_ipcount |
uint8_t vh_interval
| vh_interval |
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.