mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
e1ae44b536
Having the definitions sit in the `net/gnrc/sixlowpan/frag.h` header does not make much sense, when using Selective Fragment Forwarding (and the fragmentation buffer already includes a `net/gnrc/sixlowpan/frag/stats.h` header), so they are moved to their own header. Since with this change it makes more sense to have the statistics stored in their own sub-module, the pseudo-module is also actualized.
76 lines
2.2 KiB
C
76 lines
2.2 KiB
C
/*
|
|
* Copyright (C) 2015 Martine Lenders <mlenders@inf.fu-berlin.de>
|
|
* Copyright (C) 2015 Hamburg University of Applied Sciences
|
|
*
|
|
* 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 6LoWPAN Fragmentation
|
|
* @ingroup net_gnrc_sixlowpan
|
|
* @brief 6LoWPAN Fragmentation headers and functionality
|
|
* @see <a href="https://tools.ietf.org/html/rfc4944#section-5.3">
|
|
* RFC 4944, section 5.3
|
|
* </a>
|
|
* @{
|
|
*
|
|
* @file
|
|
* @brief 6LoWPAN Fragmentation definitions
|
|
*
|
|
* @author Martine Lenders <mlenders@inf.fu-berlin.de>
|
|
* @author Peter Kietzmann <peter.kietzmann@haw-hamburg.de>
|
|
*/
|
|
#ifndef NET_GNRC_SIXLOWPAN_FRAG_H
|
|
#define NET_GNRC_SIXLOWPAN_FRAG_H
|
|
|
|
#include <inttypes.h>
|
|
|
|
#include "byteorder.h"
|
|
#include "net/gnrc/pkt.h"
|
|
#include "net/gnrc/netif/hdr.h"
|
|
#ifdef MODULE_GNRC_SIXLOWPAN_FRAG_HINT
|
|
#include "net/gnrc/sixlowpan/frag/hint.h"
|
|
#endif /* MODULE_GNRC_SIXLOWPAN_FRAG_HINT */
|
|
#include "net/gnrc/sixlowpan/frag/fb.h"
|
|
#include "net/gnrc/sixlowpan/internal.h"
|
|
#include "net/ieee802154.h"
|
|
#include "net/sixlowpan.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* @brief Sends a packet fragmented
|
|
*
|
|
* @pre `ctx != NULL`
|
|
* @pre gnrc_sixlowpan_frag_fb_t::pkt of @p ctx is equal to @p pkt or
|
|
* `pkt == NULL`.
|
|
*
|
|
* @param[in] pkt A packet. May be NULL.
|
|
* @param[in] ctx A fragmentation buffer entry. Expected to be of type
|
|
* @ref gnrc_sixlowpan_frag_fb_t, with
|
|
* gnrc_sixlowpan_frag_fb_t set to @p pkt. Must not be
|
|
* NULL.
|
|
* @param[in] page Current 6Lo dispatch parsing page.
|
|
*/
|
|
void gnrc_sixlowpan_frag_send(gnrc_pktsnip_t *pkt, void *ctx, unsigned page);
|
|
|
|
/**
|
|
* @brief Handles a packet containing a fragment header
|
|
*
|
|
* @param[in] pkt The packet to handle
|
|
* @param[in] ctx Context for the packet. May be NULL.
|
|
* @param[in] page Current 6Lo dispatch parsing page.
|
|
*/
|
|
void gnrc_sixlowpan_frag_recv(gnrc_pktsnip_t *pkt, void *ctx, unsigned page);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* NET_GNRC_SIXLOWPAN_FRAG_H */
|
|
/** @} */
|