zephyr/subsys/net/ip/6lo.h
David B. Kinder ac74d8b652 license: Replace Apache boilerplate with SPDX tag
Replace the existing Apache 2.0 boilerplate header with an SPDX tag
throughout the zephyr code tree. This patch was generated via a
script run over the master branch.

Also updated doc/porting/application.rst that had a dependency on
line numbers in a literal include.

Manually updated subsys/logging/sys_log.c that had a malformed
header in the original file.  Also cleanup several cases that already
had a SPDX tag and we either got a duplicate or missed updating.

Jira: ZEP-1457

Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-19 03:50:58 +00:00

66 lines
1.7 KiB
C

/** @file
@brief 6lowpan handler
This is not to be included by the application.
*/
/*
* Copyright (c) 2016 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __NET_6LO_H
#define __NET_6LO_H
#include <misc/slist.h>
#include <stdint.h>
#include <net/nbuf.h>
#include "icmpv6.h"
typedef bool (*fragment_handler_t)(struct net_buf *, int);
/**
* @brief Compress IPv6 packet as per RFC 6282
*
* @details After this IPv6 packet and next header(if UDP), headers
* are compressed as per RFC 6282. After header compression data
* will be adjusted according to remaining space in fragments.
*
* @param Pointer to network buffer
* @param iphc true for IPHC compression, false for IPv6 dispatch header
* @param Pointer to fragment function
*
* @return True on success, false otherwise
*/
bool net_6lo_compress(struct net_buf *buf, bool iphc,
fragment_handler_t fragment);
/**
* @brief Unompress IPv6 packet as per RFC 6282
*
* @details After this IPv6 packet and next header(if UDP), headers
* are uncompressed as per RFC 6282. After header uncompression data
* will be adjusted according to remaining space in fragments.
*
* @param Pointer to network buffer
*
* @return True on success, false otherwise
*/
bool net_6lo_uncompress(struct net_buf *buf);
/**
* @brief Set 6lowpan context information
*
* @details Set 6lowpan context information. This context information
* will be used in IPv6 header compression and uncompression.
*
* @return True on success, false otherwise
*/
#if defined(CONFIG_NET_6LO_CONTEXT)
void net_6lo_set_context(struct net_if *iface,
struct net_icmpv6_nd_opt_6co *context);
#endif
#endif /* __NET_6LO_H */