ext.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2015 Martine Lenders <mlenders@inf.fu-berlin.de>
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
21 #include <stdbool.h>
22 #include <stdint.h>
23 #include <stdlib.h>
24 
25 #include "net/gnrc/pkt.h"
26 #include "net/ipv6/ext.h"
27 #include "timex.h"
28 
29 #ifdef MODULE_GNRC_IPV6_EXT_RH
30 #include "net/gnrc/ipv6/ext/rh.h"
31 #endif
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
50 #ifndef CONFIG_GNRC_IPV6_EXT_FRAG_SEND_SIZE
51 #define CONFIG_GNRC_IPV6_EXT_FRAG_SEND_SIZE (1U)
52 #endif
53 
61 #ifndef CONFIG_GNRC_IPV6_EXT_FRAG_RBUF_SIZE
62 #define CONFIG_GNRC_IPV6_EXT_FRAG_RBUF_SIZE (1U)
63 #endif
64 
73 #ifndef CONFIG_GNRC_IPV6_EXT_FRAG_LIMITS_POOL_SIZE
74 #define CONFIG_GNRC_IPV6_EXT_FRAG_LIMITS_POOL_SIZE (CONFIG_GNRC_IPV6_EXT_FRAG_RBUF_SIZE * 2U)
75 #endif
76 
82 #ifndef CONFIG_GNRC_IPV6_EXT_FRAG_RBUF_TIMEOUT_US
83 #define CONFIG_GNRC_IPV6_EXT_FRAG_RBUF_TIMEOUT_US (10U * US_PER_SEC)
84 #endif
85 
95 #ifdef DOXYGEN
96 #define CONFIG_GNRC_IPV6_EXT_FRAG_RBUF_DO_NOT_OVERRIDE
97 #endif
98 
114  uint8_t nh, size_t size);
115 
116 #if defined(MODULE_GNRC_IPV6_EXT) || defined(DOXYGEN)
149  uint8_t *protnum);
150 
180  uint8_t *protnum);
181 #else /* defined(MODULE_GNRC_IPV6_EXT) || defined(DOXYGEN) */
182 /* NOPs to make the usage code more readable */
183 #define gnrc_ipv6_ext_process_hopopt(pkt, protnum) (pkt)
184 #define gnrc_ipv6_ext_process_all(pkt, protnum) (pkt)
185 #endif /* defined(MODULE_GNRC_IPV6_EXT) || defined(DOXYGEN) */
186 
187 #ifdef __cplusplus
188 }
189 #endif
190 
GNRC routing extension header definitions.
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.
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_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_...
IPv6 extension header definitions.
General definitions for network packets and their helper functions.
Type to represent parts (either headers or payload) of a packet, called snips.
Definition: pkt.h:105
Utility library for comparing and computing timestamps.