Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers lowpan6_opts.h Source File

lowpan6_opts.h

Go to the documentation of this file.
00001 /**
00002  * @file
00003  * 6LowPAN options list
00004  */
00005 
00006 /*
00007  * Copyright (c) 2015 Inico Technologies Ltd.
00008  * All rights reserved.
00009  *
00010  * Redistribution and use in source and binary forms, with or without modification,
00011  * are permitted provided that the following conditions are met:
00012  *
00013  * 1. Redistributions of source code must retain the above copyright notice,
00014  *    this list of conditions and the following disclaimer.
00015  * 2. Redistributions in binary form must reproduce the above copyright notice,
00016  *    this list of conditions and the following disclaimer in the documentation
00017  *    and/or other materials provided with the distribution.
00018  * 3. The name of the author may not be used to endorse or promote products
00019  *    derived from this software without specific prior written permission.
00020  *
00021  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
00022  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00023  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
00024  * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00025  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
00026  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00027  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00028  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
00029  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
00030  * OF SUCH DAMAGE.
00031  *
00032  * This file is part of the lwIP TCP/IP stack.
00033  *
00034  * Author: Ivan Delamer <delamer@inicotech.com>
00035  *
00036  *
00037  * Please coordinate changes and requests with Ivan Delamer
00038  * <delamer@inicotech.com>
00039  */
00040 
00041 #ifndef LWIP_HDR_LOWPAN6_OPTS_H
00042 #define LWIP_HDR_LOWPAN6_OPTS_H
00043 
00044 #include "lwip/opt.h"
00045 
00046 /** LWIP_6LOWPAN_NUM_CONTEXTS: define the number of compression
00047  * contexts per netif type
00048  */
00049 #ifndef LWIP_6LOWPAN_NUM_CONTEXTS
00050 #define LWIP_6LOWPAN_NUM_CONTEXTS        10
00051 #endif
00052 
00053 /** LWIP_6LOWPAN_INFER_SHORT_ADDRESS: set this to 0 to disable creating
00054  * short addresses for matching addresses (debug only)
00055  */
00056 #ifndef LWIP_6LOWPAN_INFER_SHORT_ADDRESS
00057 #define LWIP_6LOWPAN_INFER_SHORT_ADDRESS 1
00058 #endif
00059 
00060 /** LWIP_6LOWPAN_IPHC: set this to 0 to disable IP header compression as per
00061  * RFC 6282 (which is mandatory for BLE)
00062  */
00063 #ifndef LWIP_6LOWPAN_IPHC
00064 #define LWIP_6LOWPAN_IPHC                1
00065 #endif
00066 
00067 /** Set this to 1 if your IEEE 802.15.4 interface can calculate and check the
00068  * CRC in hardware. This means TX packets get 2 zero bytes added on transmission
00069  * which are to be filled with the CRC.
00070  */
00071 #ifndef LWIP_6LOWPAN_802154_HW_CRC
00072 #define LWIP_6LOWPAN_802154_HW_CRC       0
00073 #endif
00074 
00075 /** If LWIP_6LOWPAN_802154_HW_CRC==0, this can override the default slow
00076  * implementation of the CRC used for 6LoWPAN over IEEE 802.15.4 (which uses
00077  * a shift register).
00078  */
00079 #ifndef LWIP_6LOWPAN_CALC_CRC
00080 #define LWIP_6LOWPAN_CALC_CRC(buf, len)  lowpan6_calc_crc(buf, len)
00081 #endif
00082 
00083 /** Debug level for 6LoWPAN in general */
00084 #ifndef LWIP_LOWPAN6_DEBUG
00085 #define LWIP_LOWPAN6_DEBUG               LWIP_DBG_OFF
00086 #endif
00087 
00088 /** Debug level for 6LoWPAN over IEEE 802.15.4 */
00089 #ifndef LWIP_LOWPAN6_802154_DEBUG
00090 #define LWIP_LOWPAN6_802154_DEBUG        LWIP_DBG_OFF
00091 #endif
00092 
00093 /** LWIP_LOWPAN6_IP_COMPRESSED_DEBUG: enable compressed IP frame
00094  * output debugging
00095  */
00096 #ifndef LWIP_LOWPAN6_IP_COMPRESSED_DEBUG
00097 #define LWIP_LOWPAN6_IP_COMPRESSED_DEBUG      LWIP_DBG_OFF
00098 #endif
00099 
00100 /** LWIP_LOWPAN6_DECOMPRESSION_DEBUG: enable decompression debug output
00101  */
00102 #ifndef LWIP_LOWPAN6_DECOMPRESSION_DEBUG
00103 #define LWIP_LOWPAN6_DECOMPRESSION_DEBUG      LWIP_DBG_OFF
00104 #endif
00105 
00106 /** LWIP_RFC7668_IP_UNCOMPRESSED_DEBUG: enable decompressed IP frame
00107  * output debugging */
00108 #ifndef LWIP_RFC7668_IP_UNCOMPRESSED_DEBUG
00109 #define LWIP_RFC7668_IP_UNCOMPRESSED_DEBUG    LWIP_DBG_OFF
00110 #endif
00111 
00112 /** LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS: 
00113  * Currently, the linux kernel driver for 6lowpan sets/clears a bit in
00114  * the address, depending on the BD address (either public or not).
00115  * Might not be RFC7668 conform, so you may select to do that (=1) or
00116  * not (=0) */
00117 #ifndef LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS
00118 #define LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS 1
00119 #endif
00120 
00121 
00122 #endif /* LWIP_HDR_LOWPAN6_OPTS_H */