PcapPlusPlus
pcpp::icmp_router_address_structure Struct Reference

#include <IcmpLayer.h>

Public Member Functions

void setRouterAddress (IPv4Address addr, uint32_t preference)
 
IPv4Address getAddress ()
 

Public Attributes

uint32_t routerAddress
 
uint32_t preferenceLevel
 

Detailed Description

Router address structure, relevant for ICMP router advertisement message type (icmp_router_advertisement)

Member Function Documentation

IPv4Address pcpp::icmp_router_address_structure::getAddress ( )
Returns
The IPv4 address extracted from icmp_router_address_structure::routerAddress field
void pcpp::icmp_router_address_structure::setRouterAddress ( IPv4Address  addr,
uint32_t  preference 
)

Set router address structure from a given IPv4 address and preference level

Parameters
[in]addrIPv4 address to set
[in]preferencePreference level to set

Member Data Documentation

uint32_t pcpp::icmp_router_address_structure::preferenceLevel

The preferability of the router address as a default router address, relative to other router addresses on the same subnet. This is a twos-complement value where higher values indicate that the route is more preferable

uint32_t pcpp::icmp_router_address_structure::routerAddress

the IPv4 address of the advertised router