The IPv6 header.
More...
#include "rohc_utils.h"
#include <stdint.h>
#include <stddef.h>
#include "config.h"
Go to the source code of this file.
#define IPV6_ADDR_CMP |
( |
|
x, |
|
|
|
y |
|
) |
| |
Value:((x)->u32[0] == (y)->u32[0] && (x)->u32[1] == (y)->u32[1] && \
(x)->u32[2] == (y)->u32[2] && (x)->u32[3] == (y)->u32[3])
Compare two IPv6 addresses in (struct ipv6_addr *) format
#define IPV6_ADDR_FORMAT "%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x" |
The format to print an IPv6 address
The data to print an IPv6 address in (struct ipv6_addr *) format
#define IPV6_ADDR_RAW |
( |
|
x | ) |
|
Value:(x)[0], (x)[1], (x)[2], (x)[3], (x)[4], (x)[5], (x)[6], (x)[7], \
(x)[8], (x)[9], (x)[10], (x)[11], (x)[12], (x)[13], (x)[14], (x)[15]
The data to print an IPv6 address in raw format
#define IPV6_FLOW_MASK 0x000fffffU |
The mask for the Flow Label field
The maximum length for the IPv6 extension header context
#define IPV6_OPT_HDR_LEN_FIELD_MAX_VAL 0xffU |
The maximum value of the length field of one IPv6 extension header
The maximum length of one IPv6 extension header
#define IPV6_TC_MASK 0x0ff00000U |
The mask for the Traffic Class (TC) field
#define IPV6_VERSION_MASK 0xf0000000U |
The mask for the Traffic Class (TC) field
static uint8_t ipv6_get_dscp |
( |
const struct ipv6_hdr *const |
ipv6 | ) |
|
|
inlinestatic |
Get the Differentiated Services Code Point (DSCP) of the given IPv6 packet.
- Parameters
-
ipv6 | The header of the IPv6 packet |
- Returns
- The 6-bit DSCP
static uint32_t ipv6_get_flow_label |
( |
const struct ipv6_hdr *const |
ipv6 | ) |
|
|
inlinestatic |
Get the Flow Label of the given IPv6 packet.
- Parameters
-
ipv6 | The header of the IPv6 packet |
- Returns
- The 20-bit Flow Label
static uint8_t ipv6_get_tc |
( |
const struct ipv6_hdr *const |
ipv6 | ) |
|
|
inlinestatic |
Get the Traffic Class (TC) of the given IPv6 packet.
- Parameters
-
ipv6 | The header of the IPv6 packet |
- Returns
- The 8-bit Traffic Class (TC)
static size_t ipv6_opt_get_length |
( |
const struct ipv6_opt *const |
opt | ) |
|
|
inlinestatic |
get the length (in bytes) of the IPv6 option header
- Parameters
-
opt | The IPv6 option header |
- Returns
- The length (in bytes) of the IPv6 option header
static void ipv6_set_dscp |
( |
struct ipv6_hdr *const |
ipv6, |
|
|
const uint8_t |
dscp |
|
) |
| |
|
inlinestatic |
Set the Differentiated Services Code Point (DSCP) of the given IPv6 packet.
- Parameters
-
[in,out] | ipv6 | The header of the IPv6 packet |
| dscp | The 6-bit DSCP |
static void ipv6_set_dscp_ecn |
( |
struct ipv6_hdr *const |
ipv6, |
|
|
const uint8_t |
dscp, |
|
|
const uint8_t |
ecn |
|
) |
| |
|
inlinestatic |
Set the DSCP and ECN of the given IPv6 packet.
- Parameters
-
[in,out] | ipv6 | The header of the IPv6 packet |
| dscp | The 6-bit DSCP |
| ecn | The 2-bit ECN |
static void ipv6_set_flow_label |
( |
struct ipv6_hdr *const |
ipv6, |
|
|
const uint32_t |
flow_label |
|
) |
| |
|
inlinestatic |
Set the Flow Label of the given IPv6 packet.
- Parameters
-
[in,out] | ipv6 | The header of the IPv6 packet |
| flow_label | The 20-bit Flow Label |
static void ipv6_set_tc |
( |
struct ipv6_hdr *const |
ipv6, |
|
|
const uint8_t |
tc |
|
) |
| |
|
inlinestatic |
Set the Traffic Class (TC) of the given IPv6 packet.
- Parameters
-
[in,out] | ipv6 | The header of the IPv6 packet |
| tc | The 8-bit Traffic Class (TC) |