Layer 3 is IPv4. More...
Classes | |
struct | Header |
Layer 3 IPv4 header. More... | |
Typedefs | |
typedef L3_IP::Protocol | Protocol |
Pull into L3_IPv4 the IP protocol declaration to use in L3_IPv4::Header::protocol. More... | |
Functions | |
const Header * | get_header (const uint8_t *ptr) |
Get the L3_IPv4 header. More... | |
const Header * | get_header (const L2::Header *l2) |
Get the L3_IPv4 header. More... | |
Protocol | get_protocol (const Header *header) |
Get the protocol from the header to determine how to interpret layer 4. More... | |
int | get_version (const Header *header) |
Get the high 4 bits from Header::ver_and_ihl. More... | |
int | get_ihl (const Header *header) |
Get the low 4 bits from Header::ver_and_ihl. More... | |
uint16_t | get_header_length (const Header *header) |
32 bit words, but 8 bits per byte. More... | |
uint16_t | get_total_length (const Header *header) |
Get the total length of layer 3+. More... | |
uint16_t | get_payload_length (const Header *header) |
Number of bytes in layer 4+. More... | |
const uint8_t * | get_L4_pointer (const Header *header) |
Get a pointer to the start of layer 4. More... | |
bool | is_known_protocol (const Header *header) |
Determine if the protocol is a known value. More... | |
bool | is_unknown_protocol (const Header *header) |
Determine if the protocol is unknown. More... | |
std::string | to_string (const Protocol &proto) |
Return a simple text string that represents the IP protocol name. More... | |
bool | protocol_is_ICMP (const Protocol &protocol) |
Determine if a packet's layer 4 is UDP. More... | |
bool | protocol_is_ICMP (const L3_IPv4::Header *l3) |
Determine if a packet's layer 4 is UDP. More... | |
bool | protocol_is_TCP (const Protocol &protocol) |
Determine if a packet's layer 4 is TCP. More... | |
bool | protocol_is_TCP (const L3_IPv4::Header *l3) |
Determine if a packet's layer 4 is TCP. More... | |
bool | protocol_is_UDP (const Protocol &protocol) |
Determine if a packet's layer 4 is UDP. More... | |
bool | protocol_is_UDP (const L3_IPv4::Header *l3) |
Determine if a packet's layer 4 is UDP. More... | |
Layer 3 is IPv4.
Pull into L3_IPv4 the IP protocol declaration to use in L3_IPv4::Header::protocol.
|
inline |
|
inline |
|
inline |
32 bit words, but 8 bits per byte.
|
inline |
Get the low 4 bits from Header::ver_and_ihl.
|
inline |
Get a pointer to the start of layer 4.
|
inline |
Number of bytes in layer 4+.
|
inline |
Get the protocol from the header to determine how to interpret layer 4.
|
inline |
Get the total length of layer 3+.
|
inline |
|
inline |
Determine if the protocol is a known value.
|
inline |
Determine if the protocol is unknown.
|
inline |
Determine if a packet's layer 4 is UDP.
|
inline |
Determine if a packet's layer 4 is UDP.
|
inline |
Determine if a packet's layer 4 is TCP.
|
inline |
Determine if a packet's layer 4 is TCP.
|
inline |
Determine if a packet's layer 4 is UDP.
|
inline |
Determine if a packet's layer 4 is UDP.
|
inline |
Return a simple text string that represents the IP protocol name.