ConOpSys V2970  P004.07
ANVILEX control operating system
lowpan6_opts.h
Go to the documentation of this file.
1 /**
2  * @file
3  * 6LowPAN options list
4  */
5 
6 /*
7  * Copyright (c) 2015 Inico Technologies Ltd.
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without modification,
11  * are permitted provided that the following conditions are met:
12  *
13  * 1. Redistributions of source code must retain the above copyright notice,
14  * this list of conditions and the following disclaimer.
15  * 2. Redistributions in binary form must reproduce the above copyright notice,
16  * this list of conditions and the following disclaimer in the documentation
17  * and/or other materials provided with the distribution.
18  * 3. The name of the author may not be used to endorse or promote products
19  * derived from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
22  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
23  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
24  * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
26  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
29  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
30  * OF SUCH DAMAGE.
31  *
32  * This file is part of the lwIP TCP/IP stack.
33  *
34  * Author: Ivan Delamer <delamer@inicotech.com>
35  *
36  *
37  * Please coordinate changes and requests with Ivan Delamer
38  * <delamer@inicotech.com>
39  */
40 
41 #ifndef LWIP_HDR_LOWPAN6_OPTS_H
42 #define LWIP_HDR_LOWPAN6_OPTS_H
43 
44 #include "lwip/opt.h"
45 
46 /** LWIP_6LOWPAN_NUM_CONTEXTS: define the number of compression
47  * contexts per netif type
48  */
49 #ifndef LWIP_6LOWPAN_NUM_CONTEXTS
50 #define LWIP_6LOWPAN_NUM_CONTEXTS 10
51 #endif
52 
53 /** LWIP_6LOWPAN_INFER_SHORT_ADDRESS: set this to 0 to disable creating
54  * short addresses for matching addresses (debug only)
55  */
56 #ifndef LWIP_6LOWPAN_INFER_SHORT_ADDRESS
57 #define LWIP_6LOWPAN_INFER_SHORT_ADDRESS 1
58 #endif
59 
60 /** LWIP_6LOWPAN_IPHC: set this to 0 to disable IP header compression as per
61  * RFC 6282 (which is mandatory for BLE)
62  */
63 #ifndef LWIP_6LOWPAN_IPHC
64 #define LWIP_6LOWPAN_IPHC 1
65 #endif
66 
67 /** Set this to 1 if your IEEE 802.15.4 interface can calculate and check the
68  * CRC in hardware. This means TX packets get 2 zero bytes added on transmission
69  * which are to be filled with the CRC.
70  */
71 #ifndef LWIP_6LOWPAN_802154_HW_CRC
72 #define LWIP_6LOWPAN_802154_HW_CRC 0
73 #endif
74 
75 /** If LWIP_6LOWPAN_802154_HW_CRC==0, this can override the default slow
76  * implementation of the CRC used for 6LoWPAN over IEEE 802.15.4 (which uses
77  * a shift register).
78  */
79 #ifndef LWIP_6LOWPAN_CALC_CRC
80 #define LWIP_6LOWPAN_CALC_CRC(buf, len) lowpan6_calc_crc(buf, len)
81 #endif
82 
83 /** Debug level for 6LoWPAN in general */
84 #ifndef LWIP_LOWPAN6_DEBUG
85 #define LWIP_LOWPAN6_DEBUG LWIP_DBG_OFF
86 #endif
87 
88 /** Debug level for 6LoWPAN over IEEE 802.15.4 */
89 #ifndef LWIP_LOWPAN6_802154_DEBUG
90 #define LWIP_LOWPAN6_802154_DEBUG LWIP_DBG_OFF
91 #endif
92 
93 /** LWIP_LOWPAN6_IP_COMPRESSED_DEBUG: enable compressed IP frame
94  * output debugging
95  */
96 #ifndef LWIP_LOWPAN6_IP_COMPRESSED_DEBUG
97 #define LWIP_LOWPAN6_IP_COMPRESSED_DEBUG LWIP_DBG_OFF
98 #endif
99 
100 /** LWIP_LOWPAN6_DECOMPRESSION_DEBUG: enable decompression debug output
101  */
102 #ifndef LWIP_LOWPAN6_DECOMPRESSION_DEBUG
103 #define LWIP_LOWPAN6_DECOMPRESSION_DEBUG LWIP_DBG_OFF
104 #endif
105 
106 /** LWIP_RFC7668_IP_UNCOMPRESSED_DEBUG: enable decompressed IP frame
107  * output debugging */
108 #ifndef LWIP_RFC7668_IP_UNCOMPRESSED_DEBUG
109 #define LWIP_RFC7668_IP_UNCOMPRESSED_DEBUG LWIP_DBG_OFF
110 #endif
111 
112 /** LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS:
113  * Currently, the linux kernel driver for 6lowpan sets/clears a bit in
114  * the address, depending on the BD address (either public or not).
115  * Might not be RFC7668 conform, so you may select to do that (=1) or
116  * not (=0) */
117 #ifndef LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS
118 #define LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS 1
119 #endif
120 
121 
122 #endif /* LWIP_HDR_LOWPAN6_OPTS_H */