Go to the documentation of this file.
21 #ifndef NET_IPV6_EXT_FRAG_H
22 #define NET_IPV6_EXT_FRAG_H
33 #define IPV6_EXT_FRAG_OFFSET_MASK (0xFFF8)
34 #define IPV6_EXT_FRAG_M (0x0001)
39 typedef struct __attribute__((packed)) {
#define IPV6_EXT_FRAG_M
M flag.
network_uint32_t id
identification
A 32 bit integer in big endian aka network byte order.
Functions to work with different byte orders.
A 16 bit integer in big endian aka network byte order.
uint8_t u8[2]
8 bit representation
static bool ipv6_ext_frag_more(const ipv6_ext_frag_t *frag)
Checks if more fragments are coming after the given fragment.
static unsigned ipv6_ext_frag_get_offset(const ipv6_ext_frag_t *frag)
Get offset of fragment in bytes.
static network_uint16_t byteorder_htons(uint16_t v)
Convert from host byte order to network byte order, 16 bit.
static void ipv6_ext_frag_set_more(ipv6_ext_frag_t *frag)
Sets the M flag of a fragment header.
#define IPV6_EXT_FRAG_OFFSET_MASK
Mask for the offset.
Fragment header definition.
static uint16_t byteorder_ntohs(network_uint16_t v)
Convert from network byte order to host byte order, 16 bit.
network_uint16_t offset_flags
11-bit fragment offset and flags
static void ipv6_ext_frag_set_offset(ipv6_ext_frag_t *frag, unsigned offset)
Sets the offset field of a fragment header.