-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gnrc_sixlowpan_frag: Initial import of a fragment size hint feature
This allows for sending of fragments smaller than the restrictions set by the link-layer PDU. E.g. to put some slack for IPHC into the first fragment (see https://tools.ietf.org/html/draft-ietf-6lo-fragment-recovery-02#section-4.1).
- Loading branch information
Showing
5 changed files
with
117 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
* Copyright (C) 2019 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. | ||
*/ | ||
|
||
/** | ||
* @defgroup net_gnrc_sixlowpan_frag_hint Fragment size hint | ||
* @ingroup net_gnrc_sixlowpan_frag | ||
* @brief Provides a hint for smaller fragment sizes than the link-layer | ||
* PDU for the *first fragment*. | ||
* @{ | ||
* | ||
* @file | ||
* @brief Definitions to provide a hint on the final fragment size | ||
* | ||
* @author Martine Lenders <[email protected]> | ||
*/ | ||
#ifndef NET_GNRC_SIXLOWPAN_FRAG_HINT_H | ||
#define NET_GNRC_SIXLOWPAN_FRAG_HINT_H | ||
|
||
#include <stdint.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @brief A fragment size hint | ||
*/ | ||
typedef struct { | ||
/** | ||
* @brief Provides a hint of the size for the next fragment to send | ||
* | ||
* Set to 0 for fitting to the maximum fragment size of the interface the | ||
* datagram is sent over. | ||
* | ||
* @see gnrc_netif_6lo_t::max_frag_size | ||
*/ | ||
uint16_t fragsz; | ||
/** | ||
* @brief The size of the data bound by gnrc_sixlowpan_frag_hint_t::fragsz | ||
* uncompressed | ||
* | ||
* This is only evaluated when gnrc_sixlowpan_frag_hint_t::fragsz is greater | ||
* than 0. | ||
* Required to calculate the proper offset for the next fragment. | ||
*/ | ||
uint16_t fragsz_uncomp; | ||
} gnrc_sixlowpan_frag_hint_t; | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* NET_GNRC_SIXLOWPAN_FRAG_HINT_H */ | ||
/** @} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters