2015-04-08 11:56:10 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2015 Martine Lenders <mlenders@inf.fu-berlin.de>
|
2015-12-02 10:57:22 +01:00
|
|
|
* Copyright (C) 2015 Hamburg University of Applied Sciences
|
2015-04-08 11:56:10 +02:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2015-08-17 15:41:29 +02:00
|
|
|
* @defgroup net_gnrc_sixlowpan_frag 6LoWPAN Fragmentation
|
|
|
|
* @ingroup net_gnrc_sixlowpan
|
2015-04-08 11:56:10 +02:00
|
|
|
* @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>
|
2015-12-02 10:57:22 +01:00
|
|
|
* @author Peter Kietzmann <peter.kietzmann@haw-hamburg.de>
|
2015-04-08 11:56:10 +02:00
|
|
|
*/
|
2017-05-23 18:19:52 +02:00
|
|
|
#ifndef NET_GNRC_SIXLOWPAN_FRAG_H
|
|
|
|
#define NET_GNRC_SIXLOWPAN_FRAG_H
|
2015-04-08 11:56:10 +02:00
|
|
|
|
|
|
|
#include <inttypes.h>
|
|
|
|
|
|
|
|
#include "byteorder.h"
|
2015-08-17 15:41:29 +02:00
|
|
|
#include "net/gnrc/pkt.h"
|
2018-06-28 23:10:48 +02:00
|
|
|
#include "net/gnrc/netif/hdr.h"
|
2019-02-25 16:41:27 +01:00
|
|
|
#ifdef MODULE_GNRC_SIXLOWPAN_FRAG_HINT
|
|
|
|
#include "net/gnrc/sixlowpan/frag/hint.h"
|
|
|
|
#endif /* MODULE_GNRC_SIXLOWPAN_FRAG_HINT */
|
2019-10-17 16:56:38 +02:00
|
|
|
#include "net/gnrc/sixlowpan/frag/fb.h"
|
2019-02-25 17:08:30 +01:00
|
|
|
#include "net/gnrc/sixlowpan/internal.h"
|
2018-06-14 17:13:51 +02:00
|
|
|
#include "net/ieee802154.h"
|
2015-08-17 15:06:44 +02:00
|
|
|
#include "net/sixlowpan.h"
|
2015-04-08 11:56:10 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
2018-06-19 14:59:49 +02:00
|
|
|
* @brief Sends a packet fragmented
|
2015-04-08 11:56:10 +02:00
|
|
|
*
|
2018-06-19 14:59:49 +02:00
|
|
|
* @pre `ctx != NULL`
|
2019-10-17 16:56:38 +02:00
|
|
|
* @pre gnrc_sixlowpan_frag_fb_t::pkt of @p ctx is equal to @p pkt or
|
2018-06-19 14:59:49 +02:00
|
|
|
* `pkt == NULL`.
|
|
|
|
*
|
|
|
|
* @param[in] pkt A packet. May be NULL.
|
2019-10-17 16:56:38 +02:00
|
|
|
* @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
|
2018-06-19 14:59:49 +02:00
|
|
|
* 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.
|
2015-04-08 11:56:10 +02:00
|
|
|
*/
|
2018-06-19 14:59:49 +02:00
|
|
|
void gnrc_sixlowpan_frag_recv(gnrc_pktsnip_t *pkt, void *ctx, unsigned page);
|
2015-04-08 11:56:10 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2017-05-23 18:19:52 +02:00
|
|
|
#endif /* NET_GNRC_SIXLOWPAN_FRAG_H */
|
2015-04-08 11:56:10 +02:00
|
|
|
/** @} */
|