hdr.h File Reference

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

Detailed Description

IPv6 header type and helper function definitions.

Author
Martine Lenders mlend.nosp@m.ers@.nosp@m.inf.f.nosp@m.u-be.nosp@m.rlin..nosp@m.de

Definition in file hdr.h.

#include <stdint.h>
#include "byteorder.h"
#include "net/inet_csum.h"
#include "net/ipv6/addr.h"
+ Include dependency graph for hdr.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ipv6_hdr_t
 Data type to represent an IPv6 packet header. More...
 

Functions

static void ipv6_hdr_set_version (ipv6_hdr_t *hdr)
 Sets the version field of hdr to 6. More...
 
static uint8_t ipv6_hdr_get_version (const ipv6_hdr_t *hdr)
 Gets the value of the version field of hdr. More...
 
static bool ipv6_hdr_is (const ipv6_hdr_t *hdr)
 Checks if the version field is set to 6. More...
 
static void ipv6_hdr_set_tc (ipv6_hdr_t *hdr, uint8_t tc)
 Sets the traffic class field of hdr. More...
 
static void ipv6_hdr_set_tc_ecn (ipv6_hdr_t *hdr, uint8_t ecn)
 Sets the value of the Explicit Congestion Notification (ECN) part of the traffic class field of hdr. More...
 
static void ipv6_hdr_set_tc_dscp (ipv6_hdr_t *hdr, uint8_t dscp)
 Sets the value of the Differentiated Service Codepoint (DSCP) part of the traffic class field of hdr. More...
 
static uint8_t ipv6_hdr_get_tc (const ipv6_hdr_t *hdr)
 Gets the value of the traffic class field of hdr. More...
 
static uint8_t ipv6_hdr_get_tc_ecn (const ipv6_hdr_t *hdr)
 Gets the value of the Explicit Congestion Notification (ECN) part of the traffic class field of hdr. More...
 
static uint8_t ipv6_hdr_get_tc_dscp (const ipv6_hdr_t *hdr)
 Gets the value of the Differentiated Service Codepoint (DSCP) part of the traffic class field of hdr. More...
 
static void ipv6_hdr_set_fl (ipv6_hdr_t *hdr, uint32_t fl)
 Sets the flow label field of hdr. More...
 
static uint32_t ipv6_hdr_get_fl (const ipv6_hdr_t *hdr)
 Gets the value of the flow label field of hdr. More...
 
static uint16_t ipv6_hdr_inet_csum (uint16_t sum, ipv6_hdr_t *hdr, uint8_t prot_num, uint16_t len)
 Calculates the Internet Checksum for the IPv6 Pseudo Header. More...
 
void ipv6_hdr_print (ipv6_hdr_t *hdr)
 Outputs an IPv6 header to stdout. More...