Loading...
Searching...
No Matches
ext.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015 Martine Lenders <mlenders@inf.fu-berlin.de>
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
20#ifndef NET_IPV6_EXT_H
21#define NET_IPV6_EXT_H
22
23#include <stdint.h>
24
25#include "net/ipv6/ext/frag.h"
26#include "net/ipv6/ext/rh.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32#define IPV6_EXT_LEN_UNIT (8U)
40typedef struct __attribute__((packed)) {
41 uint8_t nh;
42 uint8_t len;
44
53{
54 return (ipv6_ext_t *)((uint8_t *)(ext) + (ext->len * IPV6_EXT_LEN_UNIT) +
56}
57
58#ifdef __cplusplus
59}
60#endif
61
62#endif /* NET_IPV6_EXT_H */
#define IPV6_EXT_LEN_UNIT
Unit in byte for the extension header's length field.
Definition ext.h:32
static ipv6_ext_t * ipv6_ext_get_next(ipv6_ext_t *ext)
Gets the next extension header in a packet.
Definition ext.h:52
Fragmentation extension definitions.
Routing extension header definitions.
IPv6 extension headers.
Definition ext.h:40
uint8_t nh
next header
Definition ext.h:41
uint8_t len
length in 8 octets without first octet
Definition ext.h:42