ROHC compression/decompression library
Data Fields
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

◆ @4

union { ... }

◆ @6

union { ... }

◆ check

uint16_t ipv4_hdr::check

The checksum over the IP header

◆ daddr

uint32_t ipv4_hdr::daddr

The destination IP address

◆ df

uint8_t ipv4_hdr::df

◆ dscp

uint8_t ipv4_hdr::dscp

◆ dscp_ecn

uint8_t ipv4_hdr::dscp_ecn

The combined DSCP and ECN fields

◆ ecn

uint8_t ipv4_hdr::ecn

◆ frag_off

uint16_t ipv4_hdr::frag_off

The IP flags + Fragment Offset in 64-bit words

◆ frag_off1

uint8_t ipv4_hdr::frag_off1

◆ frag_off2

uint8_t ipv4_hdr::frag_off2

The Fragment Offset in 64-bit words (part 2)

◆ id

uint16_t ipv4_hdr::id

The IDentification of the packet

◆ ihl

uint8_t ipv4_hdr::ihl

◆ mf

uint8_t ipv4_hdr::mf

◆ options

uint8_t ipv4_hdr::options[0]

The IP options start here

◆ protocol

uint8_t ipv4_hdr::protocol

The Protocol of the next header

◆ reserved

uint8_t ipv4_hdr::reserved

◆ saddr

uint32_t ipv4_hdr::saddr

The source IP address

◆ tos

uint8_t ipv4_hdr::tos

The Type Of Service (TOS)

◆ tot_len

uint16_t ipv4_hdr::tot_len

The Total Length (header + payload)

◆ ttl

uint8_t ipv4_hdr::ttl

The Time To Live (TTL)

◆ version

uint8_t ipv4_hdr::version

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