ipv4_hdr Struct Reference

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]

Detailed Description

The IPv4 header.


Field Documentation

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

The combined DSCP and ECN fields

uint8_t ipv4_hdr::ecn

The IP flags + Fragment Offset in 64-bit words

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

The Protocol of the next header

uint32_t ipv4_hdr::saddr

The source IP address

uint8_t ipv4_hdr::tos

The Type Of Service (TOS)

The Total Length (header + payload)

uint8_t ipv4_hdr::ttl

The Time To Live (TTL)


The documentation for this struct was generated from the following file:

Generated on 4 Jul 2018 for ROHC compression/decompression library by  doxygen 1.6.1