A VRRP packet including the IP header.
More...
#include <vrrp_packet.hh>
List of all members.
Public Member Functions |
| void | set_source (const IPv4 &ip) |
| | Set the source IP address in the IP header.
|
| void | set_vrid (uint8_t vrid) |
| | Set the virtual router ID in the VRRP header.
|
| void | set_priority (uint8_t priority) |
| | Set the priority in the VRRP header.
|
| void | set_interval (uint8_t interval) |
| | Set the advertisement interval in VRRP's header.
|
|
void | clear_ips () |
| | Remove all IPs from the VRRP advertisement.
|
| void | add_ip (const IPv4 &ip) |
| | Add an IP to the VRRP header.
|
| void | finalize () |
| | Must be called when all fields are set.
|
| const PAYLOAD & | data () const |
| | Get the packet data.
|
| uint32_t | size () const |
| | Get the packet size.
|
| void | set_size (uint32_t size) |
| | Set the packet size.
|
| template<class T > |
| void | set_ips (const T &ips) |
| | Set multiple IPs from a container into the VRRP header.
|
Static Public Attributes |
|
static const IPv4 | mcast_group = IPv4("224.0.0.18") |
Private Attributes |
|
PAYLOAD | _data |
|
IpHeader4Writer | _ip |
|
VrrpHeader & | _vrrp |
Detailed Description
A VRRP packet including the IP header.
Member Function Documentation
| void VrrpPacket::add_ip |
( |
const IPv4 & |
ip | ) |
|
Add an IP to the VRRP header.
- Parameters:
-
| ip | IP to add to the virtual router in the VRRP header. |
| const PAYLOAD & VrrpPacket::data |
( |
| ) |
const |
Get the packet data.
- Returns:
- the packet data (IP and VRRP).
| void VrrpPacket::finalize |
( |
| ) |
|
Must be called when all fields are set.
This method will finalize any remaining fields such as checksums.
| void VrrpPacket::set_interval |
( |
uint8_t |
interval | ) |
|
Set the advertisement interval in VRRP's header.
- Parameters:
-
| interval | the advertisement interval in VRRP's header. |
template<class T >
| void VrrpPacket::set_ips |
( |
const T & |
ips | ) |
[inline] |
Set multiple IPs from a container into the VRRP header.
- Parameters:
-
| ips | collection of IP addresses to add to the VRRP header. |
| void VrrpPacket::set_priority |
( |
uint8_t |
priority | ) |
|
Set the priority in the VRRP header.
- Parameters:
-
| priority | the router priority in the VRRP header. |
| void VrrpPacket::set_size |
( |
uint32_t |
size | ) |
|
Set the packet size.
- Parameters:
-
| void VrrpPacket::set_source |
( |
const IPv4 & |
ip | ) |
|
Set the source IP address in the IP header.
- Parameters:
-
| ip | source IP address in IP header. |
| void VrrpPacket::set_vrid |
( |
uint8_t |
vrid | ) |
|
Set the virtual router ID in the VRRP header.
- Parameters:
-
| vrid | the virtual router ID in the VRRP header. |
| uint32_t VrrpPacket::size |
( |
| ) |
const |
Get the packet size.
- Returns:
- packet size.
The documentation for this class was generated from the following files:
- /home/greearb/git/xorp.ct.github/xorp/vrrp/vrrp_packet.hh
- /home/greearb/git/xorp.ct.github/xorp/vrrp/vrrp_packet.cc