MAC framer for IEEE 802.15.4
#include "net/mac/framer-802154.h"
#include "net/mac/frame802154.h"
#include "net/packetbuf.h"
#include "lib/random.h"
#include <string.h>
Macros | |
#define | _DEBUG_ 0 |
#define | PRINTADDR(addr) |
#define | PRINTF(...) |
Functions | |
static int | create (void) |
static int | is_broadcast_addr (uint8_t mode, uint8_t *addr) |
static int | parse (void) |
Variables | |
struct framer | framer_802154 |
static uint8_t | initialized = 0 |
static uint8_t | mac_dsn |
The sequence number (0x00 - 0xff) added to the transmitted data or MAC command frame. More... | |
static const uint16_t | mac_dst_pan_id = IEEE802154_PANID |
The 16-bit identifier of the PAN on which the device is sending to. More... | |
static const uint16_t | mac_src_pan_id = IEEE802154_PANID |
The 16-bit identifier of the PAN on which the device is operating. More... | |
#define _DEBUG_ 0 |
|
static |
References frame802154_fcf_t::ack_required, frame802154_t::dest_addr, frame802154_fcf_t::dest_addr_mode, frame802154_t::dest_pid, frame802154_t::fcf, frame802154_create(), FRAME802154_DATAFRAME, frame802154_hdrlen(), FRAME802154_IEEE802154_2003, FRAME802154_LONGADDRMODE, FRAME802154_SHORTADDRMODE, frame802154_fcf_t::frame_pending, frame802154_fcf_t::frame_type, frame802154_fcf_t::frame_version, FRAMER_FAILED, initialized, len, linkaddr_cmp(), linkaddr_copy(), linkaddr_node_addr, linkaddr_null, mac_dsn, mac_dst_pan_id, mac_src_pan_id, packetbuf_addr(), PACKETBUF_ADDR_RECEIVER, packetbuf_attr(), PACKETBUF_ATTR_MAC_ACK, PACKETBUF_ATTR_MAC_SEQNO, PACKETBUF_ATTR_PENDING, packetbuf_datalen(), packetbuf_dataptr(), packetbuf_hdralloc(), packetbuf_hdrptr(), packetbuf_set_attr(), packetbuf_totlen(), frame802154_fcf_t::panid_compression, params, frame802154_t::payload, frame802154_t::payload_len, PRINTADDR, PRINTF, random_rand(), frame802154_fcf_t::security_enabled, frame802154_t::seq, frame802154_t::src_addr, frame802154_fcf_t::src_addr_mode, and frame802154_t::src_pid.
|
static |
References FRAME802154_SHORTADDRMODE, and i.
Referenced by parse().
|
static |
References frame802154_t::dest_addr, frame802154_fcf_t::dest_addr_mode, frame802154_t::dest_pid, frame802154_t::fcf, FRAME802154_BROADCASTPANDID, frame802154_parse(), frame802154_fcf_t::frame_pending, frame802154_fcf_t::frame_type, FRAMER_FAILED, is_broadcast_addr(), len, mac_src_pan_id, packetbuf_addr(), PACKETBUF_ADDR_RECEIVER, PACKETBUF_ADDR_SENDER, PACKETBUF_ATTR_PACKET_ID, PACKETBUF_ATTR_PENDING, packetbuf_datalen(), packetbuf_dataptr(), packetbuf_hdrreduce(), packetbuf_set_addr(), packetbuf_set_attr(), frame802154_t::payload_len, PRINTADDR, PRINTF, frame802154_t::seq, and frame802154_t::src_addr.
struct framer framer_802154 |
|
static |
Referenced by create().
|
static |
The sequence number (0x00 - 0xff) added to the transmitted data or MAC command frame.
The default is a random value within the range.
Referenced by create().
|
static |
The 16-bit identifier of the PAN on which the device is sending to.
If this value is 0xffff, the device is not associated.
Referenced by create().
|
static |