PcapPlusPlus
Next
|
#include <VrrpLayer.h>
Public Member Functions | |
VrrpV3Layer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet, IPAddress::AddressType addressType) | |
VrrpV3Layer (IPAddress::AddressType addressType, uint8_t virtualRouterId, uint8_t priority, uint16_t maxAdvInt) | |
~VrrpV3Layer () override=default | |
uint16_t | getMaxAdvInt () const |
void | setMaxAdvInt (uint16_t maxAdvInt) |
uint16_t | calculateChecksum () const override |
Public Member Functions inherited from pcpp::VrrpLayer | |
IPAddress::AddressType | getAddressType () const |
uint8_t | getVersion () const |
VrrpType | getType () const |
uint8_t | getVirtualRouterID () const |
void | setVirtualRouterID (uint8_t virtualRouterID) |
uint8_t | getPriority () const |
VrrpPriority | getPriorityAsEnum () const |
void | setPriority (uint8_t priority) |
uint16_t | getChecksum () const |
void | calculateAndSetChecksum () |
bool | isChecksumCorrect () const |
uint8_t | getIPAddressesCount () const |
std::vector< IPAddress > | getIPAddresses () const |
bool | addIPAddresses (const std::vector< IPAddress > &ipAddresses) |
bool | addIPAddress (const IPAddress &ipAddress) |
bool | removeIPAddressAtIndex (int index) |
bool | removeAllIPAddresses () |
void | parseNextLayer () override |
void | computeCalculateFields () override |
size_t | getHeaderLen () const override |
std::string | toString () const override |
OsiModelLayer | getOsiModelLayer () const override |
Public Member Functions inherited from pcpp::Layer | |
~Layer () override | |
Layer * | getNextLayer () const |
Layer * | getPrevLayer () const |
ProtocolType | getProtocol () const |
bool | isMemberOfProtocolFamily (ProtocolTypeFamily protocolTypeFamily) const |
uint8_t * | getData () const |
size_t | getDataLen () const |
uint8_t * | getLayerPayload () const |
size_t | getLayerPayloadSize () const |
bool | isAllocatedToPacket () const |
void | copyData (uint8_t *toArr) const |
uint8_t * | getDataPtr (size_t offset=0) const override |
Additional Inherited Members | |
Public Types inherited from pcpp::VrrpLayer | |
enum | VrrpType { VrrpType_Unknown = 0 , VrrpType_Advertisement = 1 } |
enum | VrrpPriority { Default , Stop , Owner , Other } |
Static Public Member Functions inherited from pcpp::VrrpLayer | |
static ProtocolType | getVersionFromData (uint8_t *data, size_t dataLen) |
Represents VRRPv3 (Virtual Router Redundancy Protocol ver 3) layer. This class represents all the different messages of VRRP
|
inline |
A constructor that creates the layer from an existing packet raw data
[in] | data | A pointer to the raw data |
[in] | dataLen | Size of the data in bytes |
[in] | prevLayer | A pointer to the previous layer |
[in] | packet | A pointer to the Packet instance where layer will be stored in |
[in] | addressType | The IP address type to set for this layer |
|
explicit |
A constructor that allocates a new VRRPv3
addressType | The IP address type to set for this layer |
virtualRouterId | Virtual router ID |
priority | Priority |
maxAdvInt | Max advertisement interval |
|
overridedefault |
A destructor for this layer (does nothing)
|
overridevirtual |
Calculate the checksum from header and data and write the result to vrrp_header::checksum
Implements pcpp::VrrpLayer.
uint16_t pcpp::VrrpV3Layer::getMaxAdvInt | ( | ) | const |
void pcpp::VrrpV3Layer::setMaxAdvInt | ( | uint16_t | maxAdvInt | ) |
Set the maximum advertisement interval value
maxAdvInt | Value to set |