Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
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
29
extern
"C"
{
30
#endif
31
32
#define IPV6_EXT_LEN_UNIT (8U)
40
typedef struct __attribute__((packed)) {
41
uint8_t
nh
;
42
uint8_t
len
;
43
}
ipv6_ext_t
;
44
52
static
inline
ipv6_ext_t
*
ipv6_ext_get_next
(
ipv6_ext_t
*ext)
53
{
54
return
(
ipv6_ext_t
*)((uint8_t *)(ext) + (ext->
len
*
IPV6_EXT_LEN_UNIT
) +
55
IPV6_EXT_LEN_UNIT
);
56
}
57
58
#ifdef __cplusplus
59
}
60
#endif
61
62
#endif
/* NET_IPV6_EXT_H */
63
ipv6_ext_t::nh
uint8_t nh
next header
Definition:
ext.h:41
ipv6_ext_t::len
uint8_t len
length in 8 octets without first octet
Definition:
ext.h:42
ipv6_ext_get_next
static ipv6_ext_t * ipv6_ext_get_next(ipv6_ext_t *ext)
Gets the next extension header in a packet.
Definition:
ext.h:52
frag.h
Fragmentation extension definitions.
ipv6_ext_t
IPv6 extension headers.
Definition:
ext.h:40
rh.h
Routing extension header definitions.
IPV6_EXT_LEN_UNIT
#define IPV6_EXT_LEN_UNIT
Unit in byte for the extension header's length field.
Definition:
ext.h:32
Generated on Tue Nov 24 2020 19:46:52 by
1.8.17