hdr.h File Reference

IPv4 header type and helper function definitions. More...

Detailed Description

IPv4 header type and helper function definitions.

Author
José Ignacio Alamos jiala.nosp@m.mos@.nosp@m.uc.cl

Definition in file hdr.h.

#include "byteorder.h"
#include "net/ipv4/addr.h"
+ Include dependency graph for hdr.h:

Go to the source code of this file.

Data Structures

struct  ipv4_hdr_t
 Data type to represent an IPv4 packet header. More...
 

Functions

static void ipv4_hdr_set_version (ipv4_hdr_t *hdr)
 Sets the version field of hdr to 6. More...
 
static uint8_t ipv4_hdr_get_version (ipv4_hdr_t *hdr)
 Gets the value of the version field of hdr. More...
 
static void ipv4_hdr_set_ihl (ipv4_hdr_t *hdr, uint16_t ihl)
 Sets the Internet Header Length field of hdr. More...
 
static uint16_t ipv4_hdr_get_ihl (ipv4_hdr_t *hdr)
 brief Gets the value of the Internet Header Length field of hdr More...
 
static void ipv4_hdr_set_flags (ipv4_hdr_t *hdr, uint8_t flags)
 Sets the Version Control Flags field of hdr. More...
 
static uint8_t ipv4_hdr_get_flags (ipv4_hdr_t *hdr)
 brief Gets the value of the Version Control Flags field of hdr More...
 
static void ipv4_hdr_set_fo (ipv4_hdr_t *hdr, uint16_t fo)
 Sets the Fragment Offset field of hdr. More...
 
static uint16_t ipv4_hdr_get_fo (ipv4_hdr_t *hdr)
 brief Gets the value of the Fragment Offset field of hdr More...