2013-06-24 22:12:04 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2013 INRIA.
|
|
|
|
*
|
2013-11-22 20:47:05 +01:00
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser General
|
2013-06-24 22:12:04 +02:00
|
|
|
* Public License. See the file LICENSE in the top level directory for more
|
|
|
|
* details.
|
2013-11-27 17:54:30 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @defgroup net_sixlowpan 6LoWPAN
|
|
|
|
* @ingroup net
|
2013-11-28 13:25:33 +01:00
|
|
|
* @brief RIOTs 6LowPAN implementation
|
2013-06-24 22:12:04 +02:00
|
|
|
* @{
|
2013-11-27 17:54:30 +01:00
|
|
|
*
|
2013-11-28 13:25:33 +01:00
|
|
|
* @file lowpan.h
|
2013-11-27 17:54:30 +01:00
|
|
|
* @brief 6lowpan header
|
|
|
|
*
|
|
|
|
* @author Stephan Zeisberg <zeisberg@mi.fu-berlin.de>
|
|
|
|
* @author Martin Lenders <mlenders@inf.fu-berlin.de>
|
|
|
|
* @author Oliver Gesch <oliver.gesch@googlemail.com>
|
|
|
|
* @author Eric Engel <eric.engel@fu-berlin.de>
|
2013-06-24 22:12:04 +02:00
|
|
|
*/
|
|
|
|
|
2013-08-05 16:10:54 +02:00
|
|
|
#ifndef _SIXLOWPAN_LOWPAN_H
|
|
|
|
#define _SIXLOWPAN_LOWPAN_H
|
2013-06-24 22:12:04 +02:00
|
|
|
|
2013-08-13 06:41:05 +02:00
|
|
|
#include "mutex.h"
|
2013-06-24 22:12:04 +02:00
|
|
|
#include "vtimer.h"
|
2013-08-13 06:41:05 +02:00
|
|
|
|
2013-08-09 03:13:37 +02:00
|
|
|
#include "sixlowpan/lowpan.h"
|
2013-06-24 22:12:04 +02:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
uint8_t num;
|
|
|
|
ipv6_addr_t prefix;
|
|
|
|
uint8_t length;
|
|
|
|
uint8_t comp;
|
|
|
|
uint16_t lifetime;
|
|
|
|
} lowpan_context_t;
|
|
|
|
|
2013-08-09 03:13:37 +02:00
|
|
|
extern uint16_t local_address;
|
|
|
|
extern mutex_t lowpan_context_mutex;
|
2013-06-24 22:12:04 +02:00
|
|
|
|
2013-08-09 03:13:37 +02:00
|
|
|
void lowpan_read(uint8_t *data, uint8_t length,
|
|
|
|
ieee_802154_long_t *s_laddr,
|
2013-06-24 22:12:04 +02:00
|
|
|
ieee_802154_long_t *d_laddr);
|
|
|
|
uint8_t lowpan_context_len(void);
|
2013-08-09 03:13:37 +02:00
|
|
|
lowpan_context_t *lowpan_context_update(uint8_t num,
|
|
|
|
const ipv6_addr_t *prefix,
|
|
|
|
uint8_t length, uint8_t comp,
|
|
|
|
uint16_t lifetime);
|
2013-06-24 22:12:04 +02:00
|
|
|
lowpan_context_t *lowpan_context_get(void);
|
|
|
|
lowpan_context_t *lowpan_context_num_lookup(uint8_t num);
|
2013-08-09 03:13:37 +02:00
|
|
|
|
2013-11-27 17:54:30 +01:00
|
|
|
/** @} */
|
2013-08-05 16:10:54 +02:00
|
|
|
#endif /* _SIXLOWPAN_LOWPAN_H */
|