1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/net/include/sixlowpan/mac.h

63 lines
1.9 KiB
C
Raw Normal View History

2013-11-28 13:25:33 +01:00
/*
2013-08-05 16:10:54 +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-08-05 16:10:54 +02:00
* Public License. See the file LICENSE in the top level directory for more
* details.
2013-11-28 13:25:33 +01:00
*/
/**
* @ingroup net_sixlowpan_lowpan
2013-08-05 16:10:54 +02:00
* @{
2013-11-28 13:25:33 +01:00
*
* @file sixlowpan/mac.h
* @brief 6LoWPAN data structs, and prototypes for MAC layer
*
* @author Stephan Zeisberg <zeisberg@mi.fu-berlin.de>
* @author Martin Lenders <mlenders@inf.fu-berlin.de>
* @author Eric Engel <eric.engel@fu-berlin.de>
* @author Oliver Gesch <oliver.gesch@googlemail.com>
2013-08-05 16:10:54 +02:00
*/
#ifndef SIXLOWPAN_MAC_H
#define SIXLOWPAN_MAC_H
2013-08-08 16:22:37 +02:00
#include <stdint.h>
#include "transceiver.h"
#include "sixlowpan/types.h"
/**
* @brief Maximum length of a IEEE 802.15.4 long address represented as string.
*/
#define IEEE_802154_MAX_ADDR_STR_LEN (12)
2013-08-08 16:22:37 +02:00
/**
2014-02-13 15:18:16 +01:00
* @brief Send an IEEE 802.15.4 frame to a long address.
2013-08-08 16:22:37 +02:00
*
2014-02-13 15:18:16 +01:00
* @param[in] if_id The interface to send over (will be ignored if
* *mcast* is 1).
* @param[in] dest The destination address of the frame (will be
* ignored if *mcast* is 1).
* @param[in] dest_len The lengts of the destination address in byte.
* @param[in] payload The payload of the frame.
* @param[in] length The length of the payload.
* @param[in] mcast send frame as multicast frame (*addr* and *if_id*
* will be ignored).
2013-08-08 16:22:37 +02:00
*
2014-02-13 15:18:16 +01:00
* @return Length of transmitted data in byte
2013-08-08 16:22:37 +02:00
*/
2014-02-13 15:18:16 +01:00
int sixlowpan_mac_send_ieee802154_frame(int if_id, const void *dest,
uint8_t dest_len, const void *payload, uint8_t length, uint8_t mcast);
2013-08-08 16:22:37 +02:00
/**
2014-02-13 15:18:16 +01:00
* @brief Initialise 6LoWPAN MAC layer and register it to interface layer
*
2014-02-13 15:18:16 +01:00
* @return PID of the MAC receiver thread.
*/
2014-02-13 15:18:16 +01:00
int sixlowpan_mac_init(void);
2013-11-28 13:25:33 +01:00
/** @} */
2013-08-05 16:10:54 +02:00
#endif /* SIXLOWPAN_MAC_H */