The IPv4 header. More...
#include <ipv4.h>
Data Fields | |
| uint8_t | ihl:4 |
| uint8_t | version:4 |
| union { | |
| uint8_t tos | |
| uint8_t dscp_ecn | |
| struct { | |
| uint8_t ecn:2 | |
| uint8_t dscp:6 | |
| } | |
| }; | |
| uint16_t | tot_len |
| uint16_t | id |
| union { | |
| uint16_t frag_off | |
| struct { | |
| uint8_t frag_off1:5 | |
| uint8_t mf:1 | |
| uint8_t df:1 | |
| uint8_t reserved:1 | |
| uint8_t frag_off2 | |
| } | |
| }; | |
| uint8_t | ttl |
| uint8_t | protocol |
| uint16_t | check |
| uint32_t | saddr |
| uint32_t | daddr |
| uint8_t | options [0] |
The IPv4 header.
| union { ... } |
| union { ... } |
| uint16_t ipv4_hdr::check |
The checksum over the IP header
| uint32_t ipv4_hdr::daddr |
The destination IP address
| uint8_t ipv4_hdr::df |
| uint8_t ipv4_hdr::dscp |
| uint8_t ipv4_hdr::dscp_ecn |
The combined DSCP and ECN fields
| uint8_t ipv4_hdr::ecn |
| uint16_t ipv4_hdr::frag_off |
The IP flags + Fragment Offset in 64-bit words
| uint8_t ipv4_hdr::frag_off1 |
| uint8_t ipv4_hdr::frag_off2 |
The Fragment Offset in 64-bit words (part 2)
| uint16_t ipv4_hdr::id |
The IDentification of the packet
| uint8_t ipv4_hdr::ihl |
| uint8_t ipv4_hdr::mf |
| uint8_t ipv4_hdr::options[0] |
The IP options start here
| uint8_t ipv4_hdr::protocol |
The Protocol of the next header
| uint8_t ipv4_hdr::reserved |
| uint32_t ipv4_hdr::saddr |
The source IP address
| uint8_t ipv4_hdr::tos |
The Type Of Service (TOS)
| uint16_t ipv4_hdr::tot_len |
The Total Length (header + payload)
| uint8_t ipv4_hdr::ttl |
The Time To Live (TTL)
| uint8_t ipv4_hdr::version |
1.6.1