1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00
RIOT/sys/include/net/gnrc/sixlowpan/internal.h
Martine Lenders 80322cbd7d gnrc_sixlowpan_iphc: refactor sending for #8511
This refactors sending/encoding part of `gnrc_sixlowpan_iphc` to the
more layered approach modeled in #8511. Since the reception part is
already was pretty complicated to refactor, I decided to divide send
and receive up into separate changes.
2018-07-25 17:35:59 +02:00

74 lines
2.2 KiB
C

/*
* Copyright (C) 2018 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.
*/
/**
* @ingroup net_gnrc_sixlowpan
* @{
*
* @file
* @brief 6LoWPAN internal functions
*
* @author Martine Lenders <m.lenders@fu-berlin.de>
*/
#ifndef NET_GNRC_SIXLOWPAN_INTERNAL_H
#define NET_GNRC_SIXLOWPAN_INTERNAL_H
#include <stddef.h>
#include "net/gnrc/pkt.h"
#include "net/gnrc/netif.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Delegates a packet to the network layer
*
* @param[in] pkt A packet
* @param[in] context Context for the packet. May be NULL.
* @param[in] page Current 6Lo dispatch parsing page
*/
void gnrc_sixlowpan_dispatch_recv(gnrc_pktsnip_t *pkt, void *context,
unsigned page);
/**
* @brief Delegates a packet to the network interface
*
* @param[in] pkt A packet
* @param[in] context Context for the packet. May be NULL.
* @param[in] page Current 6Lo dispatch parsing page
*/
void gnrc_sixlowpan_dispatch_send(gnrc_pktsnip_t *pkt, void *context,
unsigned page);
/**
* @brief Checks if packet fits over interface (and fragments if @ref
* net_gnrc_sixlowpan_frag is available and required)
*
* @param[in] pkt The packet to fit. Must not be NULL.
* @param[in] orig_datagram_size The original (uncompressed) datagram size.
* Must be greater or equal to the length of
* @p pkt as of `pkt->next` (i.e. without
* the @ref gnrc_netif_hdr_t).
* @param[in] netif The interface to fit @p pkt over. Must not
* be NULL.
* @param[in] page Current 6Lo dispatch parsing page
*/
void gnrc_sixlowpan_multiplex_by_size(gnrc_pktsnip_t *pkt,
size_t orig_datagram_size,
gnrc_netif_t *netif,
unsigned page);
#ifdef __cplusplus
}
#endif
#endif /* NET_GNRC_SIXLOWPAN_INTERNAL_H */
/** @} */