ipv6_hdr_t Struct Reference

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

Detailed Description

The structure of the header is as follows:

1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Version| Traffic Class | Flow Label |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Payload Length | Next Header | Hop Limit |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ +
| |
+ Source Address +
| |
+ +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ +
| |
+ Destination Address +
| |
+ +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
See also
RFC 2460, section 3

Definition at line 68 of file ipv6/hdr.h.

#include <net/ipv6/hdr.h>

Data Fields

network_uint32_t v_tc_fl
 Version, traffic class, and flow label. More...
 
network_uint16_t len
 payload length of this packet. More...
 
uint8_t nh
 type of next header in this packet. More...
 
uint8_t hl
 hop limit for this packet. More...
 
ipv6_addr_t src
 source address of this packet. More...
 
ipv6_addr_t dst
 destination address of this packet. More...
 

Field Documentation

ipv6_addr_t ipv6_hdr_t::dst

Definition at line 95 of file ipv6/hdr.h.

uint8_t ipv6_hdr_t::hl

Definition at line 93 of file ipv6/hdr.h.

network_uint16_t ipv6_hdr_t::len

Definition at line 91 of file ipv6/hdr.h.

uint8_t ipv6_hdr_t::nh

Definition at line 92 of file ipv6/hdr.h.

ipv6_addr_t ipv6_hdr_t::src

Definition at line 94 of file ipv6/hdr.h.

network_uint32_t ipv6_hdr_t::v_tc_fl

The version are the 4 most significant bits, the traffic class the 8 next bit, and the remainding 20 bits are the flow label (see above).

This module provides helper functions to set, get, and check these fields accordingly:

Definition at line 90 of file ipv6/hdr.h.


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