Data type to represent an IPv6 packet header. More...
Data type to represent an IPv6 packet header.
The structure of the header is as follows:
#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. | |
ipv6_addr_t ipv6_hdr_t::dst |
network_uint16_t ipv6_hdr_t::len |
ipv6_addr_t ipv6_hdr_t::src |
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: