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 
9 #pragma once
10 
24 #include <stdbool.h>
25 #include <stdint.h>
26 #include <stdlib.h>
27 
28 #include "net/gnrc/pkt.h"
29 #include "net/ipv6/ext.h"
30 #include "timex.h"
31 
32 #ifdef MODULE_GNRC_IPV6_EXT_RH
33 #include "net/gnrc/ipv6/ext/rh.h"
34 #endif
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
53 #ifndef CONFIG_GNRC_IPV6_EXT_FRAG_SEND_SIZE
54 #define CONFIG_GNRC_IPV6_EXT_FRAG_SEND_SIZE (1U)
55 #endif
56 
64 #ifndef CONFIG_GNRC_IPV6_EXT_FRAG_RBUF_SIZE
65 #define CONFIG_GNRC_IPV6_EXT_FRAG_RBUF_SIZE (1U)
66 #endif
67 
76 #ifndef CONFIG_GNRC_IPV6_EXT_FRAG_LIMITS_POOL_SIZE
77 #define CONFIG_GNRC_IPV6_EXT_FRAG_LIMITS_POOL_SIZE (CONFIG_GNRC_IPV6_EXT_FRAG_RBUF_SIZE * 2U)
78 #endif
79 
85 #ifndef CONFIG_GNRC_IPV6_EXT_FRAG_RBUF_TIMEOUT_US
86 #define CONFIG_GNRC_IPV6_EXT_FRAG_RBUF_TIMEOUT_US (10U * US_PER_SEC)
87 #endif
88 
98 #ifdef DOXYGEN
99 #define CONFIG_GNRC_IPV6_EXT_FRAG_RBUF_DO_NOT_OVERRIDE
100 #endif
101 
117  uint8_t nh, size_t size);
118 
119 #if defined(MODULE_GNRC_IPV6_EXT) || defined(DOXYGEN)
152  uint8_t *protnum);
153 
183  uint8_t *protnum);
184 #else /* defined(MODULE_GNRC_IPV6_EXT) || defined(DOXYGEN) */
185 /* NOPs to make the usage code more readable */
186 #define gnrc_ipv6_ext_process_hopopt(pkt, protnum) (pkt)
187 #define gnrc_ipv6_ext_process_all(pkt, protnum) (pkt)
188 #endif /* defined(MODULE_GNRC_IPV6_EXT) || defined(DOXYGEN) */
189 
190 #ifdef __cplusplus
191 }
192 #endif
193 
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:108
Utility library for comparing and computing timestamps.