2017-05-16 13:23:54 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2017 Freie Universität Berlin
|
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2017-11-16 18:06:46 +01:00
|
|
|
* @ingroup net_gnrc_netif
|
2017-05-16 13:23:54 +02:00
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
2017-11-16 18:06:46 +01:00
|
|
|
* @brief 6LoWPAN definitions for @ref net_gnrc_netif
|
2017-05-16 13:23:54 +02:00
|
|
|
*
|
|
|
|
* @author Martine Lenders <m.lenders@fu-berlin.de>
|
|
|
|
*/
|
2017-11-16 18:06:46 +01:00
|
|
|
#ifndef NET_GNRC_NETIF_6LO_H
|
|
|
|
#define NET_GNRC_NETIF_6LO_H
|
2017-05-16 13:23:54 +02:00
|
|
|
|
2019-09-27 12:10:47 +02:00
|
|
|
#include <stdbool.h>
|
2017-05-16 13:23:54 +02:00
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2019-09-27 12:10:47 +02:00
|
|
|
/**
|
|
|
|
* @name Local 6LoWPAN capability flags
|
|
|
|
* @anchor net_gnrc_netif_6lo_local_flags
|
|
|
|
* @see gnrc_netif_6lo_t::local_flags
|
|
|
|
*
|
|
|
|
* Like the the capability flags in the [6LoWPAN Capability Indication Option
|
|
|
|
* (6CIO)](https://tools.ietf.org/html/rfc7400#section-3.3) are less about
|
|
|
|
* hardware capabilities than about the implementation status within the
|
|
|
|
* network. For the flags in this group it is currently undefined how to
|
|
|
|
* exchange the capabilities between nodes, but they might be added to the 6CIO
|
|
|
|
* at a later point. Once the 6CIO is implemented in GNRC and the flag is
|
|
|
|
* supported by it, the corresponding flag in these local flags can be removed.
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* @brief Selective Fragment Recovery enabled
|
|
|
|
* @see [RFC 8931](https://tools.ietf.org/html/rfc8931)
|
|
|
|
*/
|
|
|
|
#define GNRC_NETIF_6LO_LOCAL_FLAGS_SFR (0x01)
|
|
|
|
/** @} */
|
|
|
|
|
2017-05-16 13:23:54 +02:00
|
|
|
/**
|
2017-11-16 18:06:46 +01:00
|
|
|
* @brief 6Lo component of @ref gnrc_netif_t
|
2017-05-16 13:23:54 +02:00
|
|
|
*/
|
|
|
|
typedef struct {
|
|
|
|
/**
|
|
|
|
* @brief Maximum fragment size for 6Lo fragmentation.
|
|
|
|
*
|
|
|
|
* @note Only available with module
|
|
|
|
* @ref net_gnrc_sixlowpan_frag "gnrc_sixlowpan_frag".
|
|
|
|
*/
|
gnrc/netif: 6lo: use 16 bit for max_frag_size
Using 8 bit for `max_frag_size` limits that value to 255.
802.15.4g specifies a PDU of 2047 bytes which exceeds that limit.
Using a 16 bit value here allows to use the full L2 PDU.
Before:
12:02:16,300 # ping6 fe80::2068:3123:59f5:d238%8 -s 400
12:02:16,302 # sending 244 bytes
12:02:16,387 # sending 218 bytes
12:02:16,624 # 408 bytes from fe80::2068:3123:59f5:d238%8: icmp_seq=0 ttl=64 rssi=-49 dBm time=316.307 ms
12:02:17,302 # sending 244 bytes
12:02:17,387 # sending 218 bytes
12:02:17,624 # 408 bytes from fe80::2068:3123:59f5:d238%8: icmp_seq=1 ttl=64 rssi=-49 dBm time=316.307 ms
12:02:18,302 # sending 244 bytes
12:02:18,387 # sending 218 bytes
12:02:18,624 # 408 bytes from fe80::2068:3123:59f5:d238%8: icmp_seq=2 ttl=64 rssi=-50 dBm time=316.306 ms
12:02:18,625 #
12:02:18,629 # --- fe80::2068:3123:59f5:d238 PING statistics ---
With this patch:
12:09:44,276 # ping6 fe80::2068:3123:59f5:d238%8 -s 400
12:09:44,278 # sending 432 bytes
12:09:44,574 # 408 bytes from fe80::2068:3123:59f5:d238%8: icmp_seq=0 ttl=64 rssi=-52 dBm time=289.888 ms
12:09:45,279 # sending 432 bytes
12:09:45,574 # 408 bytes from fe80::2068:3123:59f5:d238%8: icmp_seq=1 ttl=64 rssi=-52 dBm time=289.885 ms
12:09:46,069 # sending 43 bytes
12:09:46,279 # sending 432 bytes
12:09:46,499 # sending 43 bytes
12:09:46,574 # 408 bytes from fe80::2068:3123:59f5:d238%8: icmp_seq=2 ttl=64 rssi=-47 dBm time=289.886 ms
12:09:46,574 #
12:09:46,578 # --- fe80::2068:3123:59f5:d238 PING statistics ---
2020-04-29 12:11:46 +02:00
|
|
|
uint16_t max_frag_size;
|
2019-09-27 12:10:47 +02:00
|
|
|
/**
|
|
|
|
* @brief 6LoWPAN capability flags beyond the ones advertised in
|
|
|
|
* [6LoWPAN Capability Indication Option
|
|
|
|
* (6CIO)](https://tools.ietf.org/html/rfc7400#section-3.3)
|
|
|
|
*
|
|
|
|
* @see [Local 6LoWPAN capability flags](@ref
|
|
|
|
* net_gnrc_netif_6lo_local_flags)
|
|
|
|
*/
|
|
|
|
uint8_t local_flags;
|
2017-11-16 18:06:46 +01:00
|
|
|
} gnrc_netif_6lo_t;
|
2017-05-16 13:23:54 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2017-11-16 18:06:46 +01:00
|
|
|
#endif /* NET_GNRC_NETIF_6LO_H */
|
2017-05-16 13:23:54 +02:00
|
|
|
/** @} */
|