Loading...
Searching...
No Matches
ipv6_hdr_t Struct Reference

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

Detailed Description

Data type to represent an IPv6 packet header.

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 8200, section 3

Definition at line 66 of file hdr.h.

#include <hdr.h>

Data Fields

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

Field Documentation

◆ dst

ipv6_addr_t ipv6_hdr_t::dst

destination address of this packet.

Definition at line 93 of file hdr.h.

◆ hl

uint8_t ipv6_hdr_t::hl

hop limit for this packet.

Definition at line 91 of file hdr.h.

◆ len

network_uint16_t ipv6_hdr_t::len

payload length of this packet.

Definition at line 89 of file hdr.h.

◆ nh

uint8_t ipv6_hdr_t::nh

type of next header in this packet.

Definition at line 90 of file hdr.h.

◆ src

ipv6_addr_t ipv6_hdr_t::src

source address of this packet.

Definition at line 92 of file hdr.h.

◆ v_tc_fl

network_uint32_t ipv6_hdr_t::v_tc_fl

Version, traffic class, and flow label.

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 88 of file hdr.h.


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