75 #if (BYTE_ORDER == LITTLE_ENDIAN)
119 bool addIPAddressesAt(
const std::vector<IPAddress>& ipAddresses,
int offset);
121 uint8_t getIPAddressLen()
const;
123 bool isIPAddressValid(
IPAddress& ipAddress)
const;
125 uint8_t* getFirstIPAddressPtr()
const;
127 uint8_t* getNextIPAddressPtr(uint8_t* ipAddressPtr)
const;
129 IPAddress getIPAddressFromData(uint8_t* data)
const;
131 void copyIPAddressToData(uint8_t* data,
const IPAddress& ipAddress)
const;
138 :
Layer(data, dataLen, prevLayer, packet, vrrpVer), m_AddressType(addressType)
331 struct vrrpv2_auth_adv
372 explicit VrrpV2Layer(uint8_t virtualRouterId, uint8_t priority, uint8_t advInt, uint8_t authType = 0);
423 struct vrrpv3_rsvd_adv
Definition: IpAddress.h:358
AddressType
Definition: IpAddress.h:364
Definition: VrrpLayer.h:117
bool isChecksumCorrect() const
void setVirtualRouterID(uint8_t virtualRouterID)
virtual uint16_t calculateChecksum() const =0
static ProtocolType getVersionFromData(uint8_t *data, size_t dataLen)
size_t getHeaderLen() const override
Definition: VrrpLayer.h:310
uint8_t getPriority() const
bool addIPAddresses(const std::vector< IPAddress > &ipAddresses)
IPAddress::AddressType getAddressType() const
void parseNextLayer() override
Definition: VrrpLayer.h:299
std::string toString() const override
void calculateAndSetChecksum()
uint8_t getIPAddressesCount() const
VrrpPriority getPriorityAsEnum() const
VrrpType
Definition: VrrpLayer.h:155
@ VrrpType_Unknown
Definition: VrrpLayer.h:157
@ VrrpType_Advertisement
Definition: VrrpLayer.h:160
void computeCalculateFields() override
uint8_t getVersion() const
bool removeIPAddressAtIndex(int index)
uint8_t getVirtualRouterID() const
void setPriority(uint8_t priority)
OsiModelLayer getOsiModelLayer() const override
Definition: VrrpLayer.h:317
uint16_t getChecksum() const
std::vector< IPAddress > getIPAddresses() const
bool removeAllIPAddresses()
VrrpPriority
Definition: VrrpLayer.h:167
@ Other
Definition: VrrpLayer.h:175
@ Stop
Definition: VrrpLayer.h:171
@ Default
Definition: VrrpLayer.h:169
@ Owner
Definition: VrrpLayer.h:173
bool addIPAddress(const IPAddress &ipAddress)
Definition: VrrpLayer.h:329
VrrpAuthType
Definition: VrrpLayer.h:342
uint8_t getAdvInt() const
~VrrpV2Layer() override=default
VrrpAuthType getAuthTypeAsEnum() const
VrrpV2Layer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: VrrpLayer.h:361
uint16_t calculateChecksum() const override
void setAdvInt(uint8_t advInt)
uint8_t getAuthType() const
void setAuthType(uint8_t authType)
VrrpV2Layer(uint8_t virtualRouterId, uint8_t priority, uint8_t advInt, uint8_t authType=0)
Definition: VrrpLayer.h:421
uint16_t calculateChecksum() const override
~VrrpV3Layer() override=default
void setMaxAdvInt(uint16_t maxAdvInt)
VrrpV3Layer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet, IPAddress::AddressType addressType)
Definition: VrrpLayer.h:436
VrrpV3Layer(IPAddress::AddressType addressType, uint8_t virtualRouterId, uint8_t priority, uint16_t maxAdvInt)
uint16_t getMaxAdvInt() const
The main namespace for the PcapPlusPlus lib.
const ProtocolType VRRPv3
Definition: ProtocolType.h:318
uint8_t ProtocolType
Definition: ProtocolType.h:17
OsiModelLayer
Definition: ProtocolType.h:364
@ OsiModelNetworkLayer
Definition: ProtocolType.h:370
const ProtocolType VRRPv2
Definition: ProtocolType.h:313