Layer 3 is either IPv4 or IPv6. More...
Enumerations | |
enum | Protocol { Protocol::Unknown = 255, Protocol::HOPOPTS = IPPROTO_HOPOPTS, Protocol::ICMP = IPPROTO_ICMP, Protocol::TCP = IPPROTO_TCP, Protocol::UDP = IPPROTO_UDP, Protocol::ICMPv6 = IPPROTO_ICMPV6 } |
Single-byte protocol numbers used in Myra::L3_IPv4::Header::protocol and Myra::L3_IPv6::Header::next_header. More... | |
Functions | |
std::string | to_string (const Protocol &protocol) |
Return a simple text string that represents the name of the IP protocol (layer 4). More... | |
bool | is_known_protocol (const Protocol &protocol) |
Determine if the protocol is a known value. More... | |
bool | is_unknown_protocol (const Protocol &protocol) |
Determine if the protocol is unknown. More... | |
Layer 3 is either IPv4 or IPv6.
|
strong |
Single-byte protocol numbers used in Myra::L3_IPv4::Header::protocol and Myra::L3_IPv6::Header::next_header.
Enumerator | |
---|---|
Unknown | |
HOPOPTS |
0x00 |
ICMP |
0x01 |
TCP |
0x06 |
UDP |
0x11 (aka decimal 17) |
ICMPv6 |
0x3a (aka decimal 58) |
|
inline |
Determine if the protocol is a known value.
|
inline |
Determine if the protocol is unknown.
|
inline |
Return a simple text string that represents the name of the IP protocol (layer 4).
"unknown"
if the protocol is unknown