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 General
5  * Public License v2.1. See the file LICENSE in the top level directory for
6  * more details.
7  */
8 
23 #ifndef NET_GNRC_IPV6_EXT_H
24 #define NET_GNRC_IPV6_EXT_H
25 
26 #include <stdbool.h>
27 #include <stdint.h>
28 #include <stdlib.h>
29 
30 #include "net/gnrc/pkt.h"
31 #include "net/ipv6/ext.h"
32 #include "timex.h"
33 
34 #ifdef MODULE_GNRC_IPV6_EXT_RH
35 #include "net/gnrc/ipv6/ext/rh.h"
36 #endif
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
55 #ifndef CONFIG_GNRC_IPV6_EXT_FRAG_SEND_SIZE
56 #define CONFIG_GNRC_IPV6_EXT_FRAG_SEND_SIZE (1U)
57 #endif
58 
66 #ifndef CONFIG_GNRC_IPV6_EXT_FRAG_RBUF_SIZE
67 #define CONFIG_GNRC_IPV6_EXT_FRAG_RBUF_SIZE (1U)
68 #endif
69 
78 #ifndef CONFIG_GNRC_IPV6_EXT_FRAG_LIMITS_POOL_SIZE
79 #define CONFIG_GNRC_IPV6_EXT_FRAG_LIMITS_POOL_SIZE (CONFIG_GNRC_IPV6_EXT_FRAG_RBUF_SIZE * 2U)
80 #endif
81 
87 #ifndef CONFIG_GNRC_IPV6_EXT_FRAG_RBUF_TIMEOUT_US
88 #define CONFIG_GNRC_IPV6_EXT_FRAG_RBUF_TIMEOUT_US (10U * US_PER_SEC)
89 #endif
90 
100 #ifdef DOXYGEN
101 #define CONFIG_GNRC_IPV6_EXT_FRAG_RBUF_DO_NOT_OVERRIDE
102 #endif
103 
119  uint8_t nh, size_t size);
120 
121 #if defined(MODULE_GNRC_IPV6_EXT) || defined(DOXYGEN)
122 
154  uint8_t *protnum);
155 
185  uint8_t *protnum);
186 #else /* defined(MODULE_GNRC_IPV6_EXT) || defined(DOXYGEN) */
187 /* NOPs to make the usage code more readable */
188 #define gnrc_ipv6_ext_process_hopopt(pkt, protnum) (pkt)
189 #define gnrc_ipv6_ext_process_all(pkt, protnum) (pkt)
190 #endif /* defined(MODULE_GNRC_IPV6_EXT) || defined(DOXYGEN) */
191 
192 #ifdef __cplusplus
193 }
194 #endif
195 
196 #endif /* NET_GNRC_IPV6_EXT_H */
197 
rh.h
GNRC routing extension header definitions.
timex.h
Utility library for comparing and computing timestamps.
gnrc_ipv6_ext_build
gnrc_pktsnip_t * gnrc_ipv6_ext_build(gnrc_pktsnip_t *ipv6, gnrc_pktsnip_t *next, uint8_t nh, size_t size)
Builds an extension header for sending.
pkt.h
General definitions for network packets and their helper functions.
ext.h
IPv6 extension header definitions.
gnrc_ipv6_ext_process_all
gnrc_pktsnip_t * gnrc_ipv6_ext_process_all(gnrc_pktsnip_t *pkt, uint8_t *protnum)
Processes a packet's extension headers after a potential initial hop-by-hop header.
gnrc_pktsnip
Type to represent parts (either headers or payload) of a packet, called snips.
Definition: pkt.h:108
gnrc_ipv6_ext_process_hopopt
gnrc_pktsnip_t * gnrc_ipv6_ext_process_hopopt(gnrc_pktsnip_t *pkt, uint8_t *protnum)
Processes a packet's payload as hop-by-hop option if protnum is pointing to a value equal to PROTNUM_...