PcapPlusPlus
23.09
|
#include <VrrpLayer.h>
Public Types | |
enum | VrrpAuthType : uint8_t { VrrpAuthType::NoAuthentication = 0, VrrpAuthType::SimpleTextPassword = 1, VrrpAuthType::IPAuthenticationHeader = 2, VrrpAuthType::MD5 = 3, VrrpAuthType::Other = 4 } |
Public Types inherited from pcpp::VrrpLayer | |
enum | VrrpType { VrrpType_Unknown = 0, VrrpType_Advertisement = 1 } |
enum | VrrpPriority { Default, Stop, Owner, Other } |
Public Member Functions | |
VrrpV2Layer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) | |
VrrpV2Layer (uint8_t virtualRouterId, uint8_t priority, uint8_t advInt, uint8_t authType=0) | |
~VrrpV2Layer () | |
uint8_t | getAdvInt () const |
void | setAdvInt (uint8_t advInt) |
uint8_t | getAuthType () const |
VrrpAuthType | getAuthTypeAsEnum () const |
void | setAuthType (uint8_t authType) |
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 | |
virtual | ~Layer () |
Layer * | getNextLayer () const |
Layer * | getPrevLayer () const |
ProtocolType | getProtocol () 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 |
Additional Inherited Members | |
Static Public Member Functions inherited from pcpp::VrrpLayer | |
static ProtocolType | getVersionFromData (uint8_t *data, size_t dataLen) |
Represents VRRPv2 (Virtual Router Redundancy Protocol ver 2) layer. This class represents all the different messages of VRRPv2
|
strong |
|
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 |
|
explicit |
A constructor that allocates a new VRRP v2 layer
virtualRouterId | Virtual router ID |
priority | Priority |
advInt | Advertisement interval |
authType | Authentication type (default value is 0) |
|
inline |
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.
uint8_t pcpp::VrrpV2Layer::getAdvInt | ( | ) | const |
uint8_t pcpp::VrrpV2Layer::getAuthType | ( | ) | const |
VrrpAuthType pcpp::VrrpV2Layer::getAuthTypeAsEnum | ( | ) | const |
void pcpp::VrrpV2Layer::setAdvInt | ( | uint8_t | advInt | ) |
Set advertisement interval value in this message
advInt | value to set |
void pcpp::VrrpV2Layer::setAuthType | ( | uint8_t | authType | ) |
Set VRRP authentication type
authType | value to set |