106 static_assert(
sizeof(
icmpv6hdr) == 4,
"icmpv6hdr size is not 4 bytes");
110 #pragma pack(push, 1)
119 static_assert(
sizeof(
icmpv6_echo_hdr) == 8,
"icmpv6_echo_hdr size is not 8 bytes");
192 void calculateChecksum();
195 return reinterpret_cast<icmpv6hdr*
>(m_Data);
Definition: IcmpV6Layer.h:202
ICMPv6EchoLayer(ICMPv6EchoType echoType, uint16_t id, uint16_t sequence, const uint8_t *data, size_t dataLen)
uint16_t getSequenceNr() const
uint8_t * getEchoDataPtr() const
Definition: IcmpV6Layer.h:245
ICMPv6EchoLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: IcmpV6Layer.h:218
size_t getEchoDataLen() const
Definition: IcmpV6Layer.h:239
std::string toString() const override
ICMPv6EchoType
An enum representing ICMPv6 echo message types.
Definition: IcmpV6Layer.h:206
@ REQUEST
Echo Request Type.
Definition: IcmpV6Layer.h:208
@ REPLY
Echo Reply Type.
Definition: IcmpV6Layer.h:210
uint16_t getIdentifier() const
Definition: IcmpV6Layer.h:124
size_t getHeaderLen() const override
Definition: IcmpV6Layer.h:173
void computeCalculateFields() override
Calculate ICMPv6 checksum field.
static Layer * parseIcmpV6Layer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
IcmpV6Layer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: IcmpV6Layer.h:131
bool isMessageOfType(ICMPv6MessageType type) const
Definition: IcmpV6Layer.h:154
OsiModelLayer getOsiModelLayer() const override
Definition: IcmpV6Layer.h:181
std::string toString() const override
ICMPv6MessageType getMessageType() const
IcmpV6Layer(ICMPv6MessageType msgType, uint8_t code, const uint8_t *data, size_t dataLen)
void parseNextLayer() override
Does nothing for this layer. ICMPv6 is the last layer.
Definition: IcmpV6Layer.h:169
uint16_t getChecksum() const
The main namespace for the PcapPlusPlus lib.
OsiModelLayer
An enum representing OSI model layers.
Definition: ProtocolType.h:225
@ OsiModelNetworkLayer
Network layer (layer 3)
Definition: ProtocolType.h:231
ICMPv6MessageType
An enum representing the available ICMPv6 message types.
Definition: IcmpV6Layer.h:13
@ ICMPv6_HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_MESSAGE
Home Agent Address Discovery Request Message.
@ ICMPv6_PRIVATE_EXPERIMENTATION3
Private Experimentation Message.
@ ICMPv6_MOBILE_PREFIX_SOLICITATION
Mobile Prefix Solicitation Message.
@ ICMPv6_HOME_AGENT_ADDRESS_DISCOVERY_REPLY_MESSAGE
Home Agent Address Discovery Reply Message.
@ ICMPv6_ICMP_NODE_INFORMATION_QUERY
Node Information Query Message.
@ ICMPv6_MULTICAST_ROUTER_ADVERTISEMENT
Multicast Router Advertisement Message.
@ ICMPv6_CERTIFICATION_PATH_ADVERTISEMENT
Certification Path Advertisement Message.
@ ICMPv6_REDIRECT_MESSAGE
Redirect Message.
@ ICMPv6_PRIVATE_EXPERIMENTATION4
Private Experimentation Message.
@ ICMPv6_NEIGHBOR_ADVERTISEMENT
Neighbor Advertisement Message.
@ ICMPv6_EXPERIMENTAL_MOBILITY
ICMP Experimental Mobility Subtype Format and Registry Message.
@ ICMPv6_TIME_EXCEEDED
Time Exceeded Message.
@ ICMPv6_ROUTER_SOLICITATION
Router Solicitation Message.
@ ICMPv6_PACKET_TOO_BIG
Packet Too Big Message.
@ ICMPv6_ROUTER_RENUMBERING
Router Renumbering Message.
@ ICMPv6_PRIVATE_EXPERIMENTATION2
Private Experimentation Message.
@ ICMPv6_ECHO_REQUEST
Echo Request Message.
@ ICMPv6_MULTICAST_LISTENER_QUERY
Multicast Listener Query Message.
@ ICMPv6_INVERSE_NEIGHBOR_DISCOVERY_SOLICITATION_MESSAGE
Inverse Neighbor Discovery Solicitation Message.
@ ICMPv6_ROUTER_ADVERTISEMENT
Router Advertisement Message.
@ ICMPv6_MULTICAST_LISTENER_DISCOVERY_REPORTS
Multicast Listener Report Message.
@ ICMPv6_MULTICAST_LISTENER_REPORT
Multicast Listener Report Message.
@ ICMPv6_DESTINATION_UNREACHABLE
Destination Unreachable Message.
@ ICMPv6_MOBILE_PREFIX_ADVERTISEMENT
Mobile Prefix Advertisement Message.
@ ICMPv6_RESERVED_EXPANSION_INFORMATIONAL
Reserved for expansion of ICMPv6 informational messages.
@ ICMPv6_NEIGHBOR_SOLICITATION
Neighbor Solicitation Message.
@ ICMPv6_CERTIFICATION_PATH_SOLICITATION
Certification Path Solicitation Message.
@ ICMPv6_MULTICAST_LISTENER_DONE
Multicast Listener Done Message.
@ ICMPv6_UNKNOWN_MESSAGE
Unknown ICMPv6 message.
@ ICMPv6_PARAMETER_PROBLEM
Parameter Problem Message.
@ ICMPv6_RPL_CONTROL_MESSAGE
RPL Control Message.
@ ICMPv6_MULTICAST_ROUTER_SOLICITATION
Multicast Router Solicitation Message.
@ ICMPv6_PRIVATE_EXPERIMENTATION1
Private Experimentation Message.
@ ICMPv6_INVERSE_NEIGHBOR_DISCOVERY_ADVERTISEMENT_MESSAGE
Inverse Neighbor Discovery Advertisement Message.
@ ICMPv6_ECHO_REPLY
Echo Reply Message.
@ ICMPv6_MULTICAST_ROUTER_TERMINATION
Multicast Router Termination Message.
@ ICMPv6_RESERVED_EXPANSION_ERROR
Reserved for expansion of ICMPv6 error messages.
@ ICMPv6_ICMP_NODE_INFORMATION_RESPONSE
Node Information Reply Message.
const ProtocolType ICMPv6
ICMPv6 protocol.
Definition: ProtocolType.h:170
Definition: IcmpV6Layer.h:112
uint16_t id
the echo request identifier
Definition: IcmpV6Layer.h:114
uint16_t sequence
the echo request sequence number
Definition: IcmpV6Layer.h:116
Definition: IcmpV6Layer.h:96
uint16_t checksum
The checksum field provides a minimal level of integrity verification for the ICMP message.
Definition: IcmpV6Layer.h:103
uint8_t type
Definition: IcmpV6Layer.h:99
uint8_t code
The code field value depends on the message type and provides an additional level of message granular...
Definition: IcmpV6Layer.h:101