|
|
static const IPv4 mcast_group | mcast_group |
VrrpPacket ()
| VrrpPacket |
void set_source (const IPv4& ip)
| set_source |
Set the source IP address in the IP header.
Parameters:
ip | source IP address in IP header. |
void set_vrid (uint8_t vrid)
| set_vrid |
Set the virtual router ID in the VRRP header.
Parameters:
vrid | the virtual router ID in the VRRP header. |
void set_priority (uint8_t priority)
| set_priority |
Set the priority in the VRRP header.
Parameters:
priority | the router priority in the VRRP header. |
void set_interval (uint8_t interval)
| set_interval |
Set the advertisement interval in VRRP's header.
Parameters:
interval | the advertisement interval in VRRP's header. |
void clear_ips ()
| clear_ips |
Remove all IPs from the VRRP advertisement.
void add_ip (const IPv4& ip)
| add_ip |
Add an IP to the VRRP header.
Parameters:
ip | IP to add to the virtual router in the VRRP header. |
void finalize ()
| finalize |
Must be called when all fields are set. This method will finalize any remaining fields such as checksums.
const PAYLOAD& data ()
| data |
[const]
Get the packet data.
Returns: the packet data (IP and VRRP).
uint32_t size ()
| size |
[const]
Get the packet size.
Returns: packet size.
template<class T> void set_ips (const T& ips)
| set_ips |
Set multiple IPs from a container into the VRRP header.
Parameters:
ips | collection of IP addresses to add to the VRRP header. |