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)
39typedef struct __attribute__((packed)) {
Functions to work with different byte orders.
static network_uint16_t byteorder_htons(uint16_t v)
Convert from host byte order to network byte order, 16 bit.
static uint16_t byteorder_ntohs(network_uint16_t v)
Convert from network byte order to host byte order, 16 bit.
#define IPV6_EXT_FRAG_M
M flag.
static void ipv6_ext_frag_set_offset(ipv6_ext_frag_t *frag, unsigned offset)
Sets the offset field of a fragment header.
static unsigned ipv6_ext_frag_get_offset(const ipv6_ext_frag_t *frag)
Get offset of fragment in bytes.
static bool ipv6_ext_frag_more(const ipv6_ext_frag_t *frag)
Checks if more fragments are coming after the given fragment.
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.
network_uint16_t offset_flags
11-bit fragment offset and flags
network_uint32_t id
identification
A 16 bit integer in big endian aka network byte order.
uint8_t u8[2]
8 bit representation
A 32 bit integer in big endian aka network byte order.