PcapPlusPlus  24.09
pcpp::icmp_router_address_structure Struct Reference

#include <IcmpLayer.h>

Public Member Functions

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

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

◆ getAddress()

IPv4Address pcpp::icmp_router_address_structure::getAddress ( ) const
inline
Returns
The IPv4 address extracted from icmp_router_address_structure::routerAddress field

◆ setRouterAddress()

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

◆ preferenceLevel

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

◆ routerAddress

uint32_t pcpp::icmp_router_address_structure::routerAddress

the IPv4 address of the advertised router