Contiki-NG
Loading...
Searching...
No Matches
frame802154.c
Go to the documentation of this file.
1/*
2 *
3 * Copyright (c) 2008, Swedish Institute of Computer Science
4 * All rights reserved.
5 *
6 * Additional fixes for AVR contributed by:
7 *
8 * Colin O'Flynn coflynn@newae.com
9 * Eric Gnoske egnoske@gmail.com
10 * Blake Leverett bleverett@gmail.com
11 * Mike Vidales mavida404@gmail.com
12 * Kevin Brown kbrown3@uccs.edu
13 * Nate Bohlmann nate@elfwerks.com
14 *
15 * Additional fixes for MSP430 contributed by:
16 * Joakim Eriksson
17 * Niclas Finne
18 * Nicolas Tsiftes
19 *
20 * All rights reserved.
21 *
22 * Redistribution and use in source and binary forms, with or without
23 * modification, are permitted provided that the following conditions are met:
24 *
25 * * Redistributions of source code must retain the above copyright
26 * notice, this list of conditions and the following disclaimer.
27 * * Redistributions in binary form must reproduce the above copyright
28 * notice, this list of conditions and the following disclaimer in
29 * the documentation and/or other materials provided with the
30 * distribution.
31 * * Neither the name of the copyright holders nor the names of
32 * contributors may be used to endorse or promote products derived
33 * from this software without specific prior written permission.
34 *
35 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
36 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
37 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
38 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
39 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
40 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
41 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
42 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
43 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
44 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
45 * POSSIBILITY OF SUCH DAMAGE.
46 *
47 */
48/*
49 * \brief This file is where the main functions that relate to frame
50 * manipulation will reside.
51 */
52
53/**
54 * \file
55 * \brief 802.15.4 frame creation and parsing functions
56 *
57 * This file converts to and from a structure to a packed 802.15.4
58 * frame.
59 */
60
61/**
62 * \addtogroup frame802154
63 * @{
64 */
65
66#include "sys/cc.h"
68#include "net/mac/llsec802154.h"
69#include "net/linkaddr.h"
70#include <string.h>
71
72/** \brief The 16-bit identifier of the PAN on which the device is
73 * operating. If this value is 0xffff, the device is not
74 * associated.
75 */
76static uint16_t mac_pan_id = IEEE802154_PANID;
77
78/**
79 * \brief Structure that contains the lengths of the various addressing and security fields
80 * in the 802.15.4 header. This structure is used in \ref frame802154_create()
81 */
82typedef struct {
83 uint8_t seqno_len; /**< Length (in bytes) of sequence number field */
84 uint8_t dest_pid_len; /**< Length (in bytes) of destination PAN ID field */
85 uint8_t dest_addr_len; /**< Length (in bytes) of destination address field */
86 uint8_t src_pid_len; /**< Length (in bytes) of source PAN ID field */
87 uint8_t src_addr_len; /**< Length (in bytes) of source address field */
88 uint8_t aux_sec_len; /**< Length (in bytes) of aux security header field */
89} field_length_t;
90
91/*----------------------------------------------------------------------------*/
92static inline uint8_t
93addr_len(uint8_t mode)
94{
95 switch(mode) {
96 case FRAME802154_SHORTADDRMODE: /* 16-bit address */
97 return 2;
98 case FRAME802154_LONGADDRMODE: /* 64-bit address */
99 return 8;
100 default:
101 return 0;
102 }
103}
104/*----------------------------------------------------------------------------*/
105#if LLSEC802154_USES_AUX_HEADER && LLSEC802154_USES_EXPLICIT_KEYS
106static uint8_t
107get_key_id_len(uint8_t key_id_mode)
108{
109 switch(key_id_mode) {
110 case FRAME802154_1_BYTE_KEY_ID_MODE:
111 return 1;
112 case FRAME802154_5_BYTE_KEY_ID_MODE:
113 return 5;
114 case FRAME802154_9_BYTE_KEY_ID_MODE:
115 return 9;
116 default:
117 return 0;
118 }
119}
120#endif /* LLSEC802154_USES_AUX_HEADER && LLSEC802154_USES_EXPLICIT_KEYS */
121/*---------------------------------------------------------------------------*/
122/* Get current PAN ID */
123uint16_t
124frame802154_get_pan_id(void)
125{
126 return mac_pan_id;
127}
128/*---------------------------------------------------------------------------*/
129/* Set current PAN ID */
130void
131frame802154_set_pan_id(uint16_t pan_id)
132{
133 mac_pan_id = pan_id;
134}
135/*----------------------------------------------------------------------------*/
136/* Tells whether a given Frame Control Field indicates a frame with
137 * source PANID and/or destination PANID */
138void
139frame802154_has_panid(frame802154_fcf_t *fcf, int *has_src_pan_id, int *has_dest_pan_id)
140{
141 int src_pan_id = 0;
142 int dest_pan_id = 0;
143
144 if(fcf == NULL) {
145 return;
146 }
147
148 if(fcf->frame_version == FRAME802154_IEEE802154_2015) {
149 /*
150 * IEEE 802.15.4-2015
151 * Table 7-2, PAN ID Compression value for frame version 0b10
152 */
155 fcf->panid_compression == 1) ||
158 fcf->panid_compression == 0) ||
159 (fcf->dest_addr_mode == FRAME802154_LONGADDRMODE &&
160 fcf->src_addr_mode == FRAME802154_LONGADDRMODE &&
161 fcf->panid_compression == 0) ||
162 ((fcf->dest_addr_mode == FRAME802154_SHORTADDRMODE &&
165 fcf->src_addr_mode == FRAME802154_SHORTADDRMODE)) ){
166 dest_pan_id = 1;
167 }
168
169 if(fcf->panid_compression == 0 &&
171 fcf->src_addr_mode == FRAME802154_LONGADDRMODE) ||
173 fcf->src_addr_mode == FRAME802154_SHORTADDRMODE) ||
174 (fcf->dest_addr_mode == FRAME802154_SHORTADDRMODE &&
175 fcf->src_addr_mode == FRAME802154_SHORTADDRMODE) ||
176 (fcf->dest_addr_mode == FRAME802154_SHORTADDRMODE &&
177 fcf->src_addr_mode == FRAME802154_LONGADDRMODE) ||
178 (fcf->dest_addr_mode == FRAME802154_LONGADDRMODE &&
179 fcf->src_addr_mode == FRAME802154_SHORTADDRMODE))) {
180 src_pan_id = 1;
181 }
182
183 } else {
184 /* No PAN ID in ACK */
185 if(fcf->frame_type != FRAME802154_ACKFRAME) {
186 if(!fcf->panid_compression && (fcf->src_addr_mode & 3)) {
187 /* If compressed, don't include source PAN ID */
188 src_pan_id = 1;
189 }
190 if(fcf->dest_addr_mode & 3) {
191 dest_pan_id = 1;
192 }
193 }
194 }
195
196 if(has_src_pan_id != NULL) {
197 *has_src_pan_id = src_pan_id;
198 }
199 if(has_dest_pan_id != NULL) {
200 *has_dest_pan_id = dest_pan_id;
201 }
202}
203/*---------------------------------------------------------------------------*/
204/* Check if the destination PAN ID, if any, matches ours */
205int
206frame802154_check_dest_panid(frame802154_t *frame)
207{
208 int has_dest_panid = 0;
209
210 if(frame == NULL) {
211 return 0;
212 }
213 frame802154_has_panid(&frame->fcf, NULL, &has_dest_panid);
214 if(!has_dest_panid ||
215 (frame->dest_pid != frame802154_get_pan_id()
216 && frame->dest_pid != FRAME802154_BROADCASTPANDID)) {
217 /* Packet to another PAN */
218 return 0;
219 }
220 return 1;
221}
222/*---------------------------------------------------------------------------*/
223/* Check is the address is a broadcast address, whatever its size */
224bool
225frame802154_is_broadcast_addr(uint8_t mode, const uint8_t *addr)
226{
227 int i = mode == FRAME802154_SHORTADDRMODE ? 2 : 8;
228 while(i-- > 0) {
229 if(addr[i] != 0xff) {
230 return false;
231 }
232 }
233 return true;
234}
235/*---------------------------------------------------------------------------*/
236/* Check and extract source and destination linkaddr from frame */
237int
238frame802154_extract_linkaddr(frame802154_t *frame,
239 linkaddr_t *source_address, linkaddr_t *dest_address)
240{
241 int src_addr_len;
242 int dest_addr_len;
243
244 if(frame == NULL) {
245 return 0;
246 }
247 /* Check and extract source address */
248 src_addr_len = frame->fcf.src_addr_mode ?
249 ((frame->fcf.src_addr_mode == FRAME802154_SHORTADDRMODE) ? 2 : 8) : 0;
250 if(src_addr_len == 0 || frame802154_is_broadcast_addr(frame->fcf.src_addr_mode, frame->src_addr)) {
251 /* Broadcast address */
252 if(source_address != NULL) {
253 linkaddr_copy(source_address, &linkaddr_null);
254 }
255 } else {
256 /* Unicast address */
257 if(src_addr_len != LINKADDR_SIZE) {
258 /* Destination address has a size we can not handle */
259 return 0;
260 }
261 if(source_address != NULL) {
262 linkaddr_copy(source_address, (linkaddr_t *)frame->src_addr);
263 }
264 }
265
266 /* Check and extract destination address */
267 dest_addr_len = frame->fcf.dest_addr_mode ?
268 ((frame->fcf.dest_addr_mode == FRAME802154_SHORTADDRMODE) ? 2 : 8) : 0;
269 if(dest_addr_len == 0 || frame802154_is_broadcast_addr(frame->fcf.dest_addr_mode, frame->dest_addr)) {
270 /* Broadcast address */
271 if(dest_address != NULL) {
272 linkaddr_copy(dest_address, &linkaddr_null);
273 }
274 } else {
275 /* Unicast address */
276 if(dest_addr_len != LINKADDR_SIZE) {
277 /* Destination address has a size we can not handle */
278 return 0;
279 }
280 if(dest_address != NULL) {
281 linkaddr_copy(dest_address, (linkaddr_t *)frame->dest_addr);
282 }
283 }
284
285 return 1;
286}
287/*----------------------------------------------------------------------------*/
288static void
289field_len(frame802154_t *p, field_length_t *flen)
290{
291 int has_src_panid;
292 int has_dest_panid;
293
294 /* init flen to zeros */
295 memset(flen, 0, sizeof(field_length_t));
296
297 /* Determine lengths of each field based on fcf and other args */
298 if((p->fcf.sequence_number_suppression & 1) == 0) {
299 flen->seqno_len = 1;
300 }
301
302 /* IEEE802.15.4e changes the meaning of PAN ID Compression (see Table 2a).
303 * In this case, we leave the decision whether to compress PAN ID or not
304 * up to the caller. */
305 if(p->fcf.frame_version < FRAME802154_IEEE802154_2015) {
306 /* Set PAN ID compression bit if src pan id matches dest pan id. */
307 p->fcf.panid_compression = (p->fcf.dest_addr_mode & 3) &&
308 (p->fcf.src_addr_mode & 3) && p->src_pid == p->dest_pid;
309 }
310
311 frame802154_has_panid(&p->fcf, &has_src_panid, &has_dest_panid);
312
313 if(has_src_panid) {
314 flen->src_pid_len = 2;
315 }
316
317 if(has_dest_panid) {
318 flen->dest_pid_len = 2;
319 }
320
321 /* determine address lengths */
322 flen->dest_addr_len = addr_len(p->fcf.dest_addr_mode & 3);
323 flen->src_addr_len = addr_len(p->fcf.src_addr_mode & 3);
324
325#if LLSEC802154_USES_AUX_HEADER
326 /* Aux security header */
327 if(p->fcf.security_enabled & 1) {
328 flen->aux_sec_len = 1; /* FCF + possibly frame counter and key ID */
331 flen->aux_sec_len += 5;
332 } else {
333 flen->aux_sec_len += 4;
334 }
335 }
336#if LLSEC802154_USES_EXPLICIT_KEYS
337 flen->aux_sec_len += get_key_id_len(p->aux_hdr.security_control.key_id_mode);
338#endif /* LLSEC802154_USES_EXPLICIT_KEYS */
339 }
340#endif /* LLSEC802154_USES_AUX_HEADER */
341}
342/*----------------------------------------------------------------------------*/
343/**
344 * \brief Calculates the length of the frame header. This function is
345 * meant to be called by a higher level function, that interfaces to a MAC.
346 *
347 * \param p Pointer to frame802154_t_t struct, which specifies the
348 * frame to send.
349 *
350 * \return The length of the frame header.
351 */
352int
354{
355 field_length_t flen;
356 field_len(p, &flen);
357 return 2 + flen.seqno_len + flen.dest_pid_len + flen.dest_addr_len +
358 flen.src_pid_len + flen.src_addr_len + flen.aux_sec_len;
359}
360void
361frame802154_create_fcf(frame802154_fcf_t *fcf, uint8_t *buf)
362{
363 buf[0] = (fcf->frame_type & 7) |
364 ((fcf->security_enabled & 1) << 3) |
365 ((fcf->frame_pending & 1) << 4) |
366 ((fcf->ack_required & 1) << 5) |
367 ((fcf->panid_compression & 1) << 6);
368 buf[1] = ((fcf->sequence_number_suppression & 1)) |
369 ((fcf->ie_list_present & 1)) << 1 |
370 ((fcf->dest_addr_mode & 3) << 2) |
371 ((fcf->frame_version & 3) << 4) |
372 ((fcf->src_addr_mode & 3) << 6);
373}
374/*----------------------------------------------------------------------------*/
375/**
376 * \brief Creates a frame for transmission over the air. This function is
377 * meant to be called by a higher level function, that interfaces to a MAC.
378 *
379 * \param p Pointer to frame802154_t struct, which specifies the
380 * frame to send.
381 *
382 * \param buf Pointer to the buffer to use for the frame.
383 *
384 * \return The length of the frame header
385 */
386int
388{
389 int c;
390 field_length_t flen;
391#if LLSEC802154_USES_EXPLICIT_KEYS
392 uint8_t key_id_mode;
393#endif /* LLSEC802154_USES_EXPLICIT_KEYS */
394
395 field_len(p, &flen);
396
397 /* OK, now we have field lengths. Time to actually construct */
398 /* the outgoing frame, and store it in buf */
399 frame802154_create_fcf(&p->fcf, buf);
400 unsigned int pos = 2;
401
402 /* Sequence number */
403 if(flen.seqno_len == 1) {
404 buf[pos++] = p->seq;
405 }
406
407 /* Destination PAN ID */
408 if(flen.dest_pid_len == 2) {
409 buf[pos++] = p->dest_pid & 0xff;
410 buf[pos++] = (p->dest_pid >> 8) & 0xff;
411 }
412
413 /* Destination address */
414 for(c = flen.dest_addr_len; c > 0; c--) {
415 buf[pos++] = p->dest_addr[c - 1];
416 }
417
418 /* Source PAN ID */
419 if(flen.src_pid_len == 2) {
420 buf[pos++] = p->src_pid & 0xff;
421 buf[pos++] = (p->src_pid >> 8) & 0xff;
422 }
423
424 /* Source address */
425 for(c = flen.src_addr_len; c > 0; c--) {
426 buf[pos++] = p->src_addr[c - 1];
427 }
428#if LLSEC802154_USES_AUX_HEADER
429 /* Aux header */
430 if(flen.aux_sec_len) {
432#if LLSEC802154_USES_EXPLICIT_KEYS
434#endif /* LLSEC802154_USES_EXPLICIT_KEYS */
437 ;
439 /* We support only 4-byte counters */
440 memcpy(buf + pos, p->aux_hdr.frame_counter.u8, 4);
441 pos += 4;
443 pos++;
444 }
445 }
446
447#if LLSEC802154_USES_EXPLICIT_KEYS
448 key_id_mode = p->aux_hdr.security_control.key_id_mode;
449 if(key_id_mode) {
450 c = (key_id_mode - 1) * 4;
451 memcpy(buf + pos, p->aux_hdr.key_source.u8, c);
452 pos += c;
453 buf[pos++] = p->aux_hdr.key_index;
454 }
455#endif /* LLSEC802154_USES_EXPLICIT_KEYS */
456 }
457#endif /* LLSEC802154_USES_AUX_HEADER */
458
459 return (int)pos;
460}
461
462void
463frame802154_parse_fcf(const uint8_t *data, frame802154_fcf_t *pfcf)
464{
466
467 /* decode the FCF */
468 fcf.frame_type = data[0] & 7;
469 fcf.security_enabled = (data[0] >> 3) & 1;
470 fcf.frame_pending = (data[0] >> 4) & 1;
471 fcf.ack_required = (data[0] >> 5) & 1;
472 fcf.panid_compression = (data[0] >> 6) & 1;
473
474 fcf.sequence_number_suppression = data[1] & 1;
475 fcf.ie_list_present = (data[1] >> 1) & 1;
476 fcf.dest_addr_mode = (data[1] >> 2) & 3;
477 fcf.frame_version = (data[1] >> 4) & 3;
478 fcf.src_addr_mode = (data[1] >> 6) & 3;
479
480 /* copy fcf */
481 memcpy(pfcf, &fcf, sizeof(frame802154_fcf_t));
482}
483/*----------------------------------------------------------------------------*/
484/**
485 * \brief Parses an input frame. Scans the input frame to find each
486 * section, and stores the information of each section in a
487 * frame802154_t structure.
488 *
489 * \param data The input data from the radio chip.
490 * \param len The size of the input data
491 * \param pf The frame802154_t struct to store the parsed frame information.
492 */
493int
494frame802154_parse(uint8_t *data, int len, frame802154_t *pf)
495{
496 uint8_t *p;
498 int c;
499 int has_src_panid;
500 int has_dest_panid;
501#if LLSEC802154_USES_EXPLICIT_KEYS
502 uint8_t key_id_mode;
503#endif /* LLSEC802154_USES_EXPLICIT_KEYS */
504
505 if(len < 2) {
506 return 0;
507 }
508
509 p = data;
510
511 /* decode the FCF */
512 frame802154_parse_fcf(p, &fcf);
513 memcpy(&pf->fcf, &fcf, sizeof(frame802154_fcf_t));
514 p += 2; /* Skip first two bytes */
515
516 if(fcf.sequence_number_suppression == 0) {
517 pf->seq = p[0];
518 p++;
519 }
520
521 frame802154_has_panid(&fcf, &has_src_panid, &has_dest_panid);
522
523 /* Destination address, if any */
524 if(fcf.dest_addr_mode) {
525 if(has_dest_panid) {
526 /* Destination PAN */
527 pf->dest_pid = p[0] + (p[1] << 8);
528 p += 2;
529 } else {
530 pf->dest_pid = 0;
531 }
532
533 /* Destination address */
534 if(fcf.dest_addr_mode == FRAME802154_SHORTADDRMODE) {
535 linkaddr_copy((linkaddr_t *)&(pf->dest_addr), &linkaddr_null);
536 pf->dest_addr[0] = p[1];
537 pf->dest_addr[1] = p[0];
538 p += 2;
539 } else if(fcf.dest_addr_mode == FRAME802154_LONGADDRMODE) {
540 for(c = 0; c < 8; c++) {
541 pf->dest_addr[c] = p[7 - c];
542 }
543 p += 8;
544 }
545 } else {
546 linkaddr_copy((linkaddr_t *)&(pf->dest_addr), &linkaddr_null);
547 pf->dest_pid = 0;
548 }
549
550 /* Source address, if any */
551 if(fcf.src_addr_mode) {
552 /* Source PAN */
553 if(has_src_panid) {
554 pf->src_pid = p[0] + (p[1] << 8);
555 p += 2;
556 if(!has_dest_panid) {
557 pf->dest_pid = pf->src_pid;
558 }
559 } else {
560 pf->src_pid = pf->dest_pid;
561 }
562
563 /* Source address */
564 if(fcf.src_addr_mode == FRAME802154_SHORTADDRMODE) {
565 linkaddr_copy((linkaddr_t *)&(pf->src_addr), &linkaddr_null);
566 pf->src_addr[0] = p[1];
567 pf->src_addr[1] = p[0];
568 p += 2;
569 } else if(fcf.src_addr_mode == FRAME802154_LONGADDRMODE) {
570 for(c = 0; c < 8; c++) {
571 pf->src_addr[c] = p[7 - c];
572 }
573 p += 8;
574 }
575 } else {
576 linkaddr_copy((linkaddr_t *)&(pf->src_addr), &linkaddr_null);
577 pf->src_pid = 0;
578 }
579
580#if LLSEC802154_USES_AUX_HEADER
581 if(fcf.security_enabled) {
583#if LLSEC802154_USES_EXPLICIT_KEYS
584 pf->aux_hdr.security_control.key_id_mode = (p[0] >> 3) & 3;
585#endif /* LLSEC802154_USES_EXPLICIT_KEYS */
588 p += 1;
589
591 memcpy(pf->aux_hdr.frame_counter.u8, p, 4);
592 p += 4;
594 p ++;
595 }
596 }
597
598#if LLSEC802154_USES_EXPLICIT_KEYS
599 key_id_mode = pf->aux_hdr.security_control.key_id_mode;
600 if(key_id_mode) {
601 c = (key_id_mode - 1) * 4;
602 memcpy(pf->aux_hdr.key_source.u8, p, c);
603 p += c;
604 pf->aux_hdr.key_index = p[0];
605 p += 1;
606 }
607#endif /* LLSEC802154_USES_EXPLICIT_KEYS */
608 }
609#endif /* LLSEC802154_USES_AUX_HEADER */
610
611 /* header length */
612 c = p - data;
613 /* payload length */
614 pf->payload_len = (len - c);
615 /* payload */
616 pf->payload = p;
617
618 /* return header length if successful */
619 return c > len ? 0 : c;
620}
621/** \} */
Default definitions of C compiler quirk work-arounds.
802.15.4 frame creation and parsing functions
int frame802154_parse(uint8_t *data, int len, frame802154_t *pf)
Parses an input frame.
#define FRAME802154_NOADDR
Only valid for ACK or Beacon frames.
int frame802154_create(frame802154_t *p, uint8_t *buf)
Creates a frame for transmission over the air.
int frame802154_hdrlen(frame802154_t *p)
Calculates the length of the frame header.
static uint16_t mac_pan_id
The 16-bit identifier of the PAN on which the device is operating.
Definition frame802154.c:76
void linkaddr_copy(linkaddr_t *dest, const linkaddr_t *src)
Copy a link-layer address.
Definition linkaddr.c:63
const linkaddr_t linkaddr_null
The null link-layer address.
Header file for the link-layer address representation.
Common functionality of 802.15.4-compliant llsec_drivers.
frame802154_scf_t security_control
Security control bitfield.
frame802154_frame_counter_t frame_counter
Frame counter, used for security.
uint8_t key_index
Key Index subfield.
frame802154_key_source_t key_source
Key Source subfield.
The IEEE 802.15.4 frame has a number of constant/fixed fields that can be counted to make frame const...
uint8_t frame_type
3 bit.
uint8_t frame_version
2 bit.
uint8_t ie_list_present
1 bit.
uint8_t security_enabled
1 bit.
uint8_t sequence_number_suppression
< 1 bit.
uint8_t src_addr_mode
2 bit.
uint8_t panid_compression
1 bit.
uint8_t ack_required
1 bit.
uint8_t dest_addr_mode
2 bit.
uint8_t frame_pending
1 bit.
uint8_t key_id_mode
2 bit.
uint8_t frame_counter_size
1 bit.
uint8_t frame_counter_suppression
1 bit.
uint8_t security_level
3 bit.
Parameters used by the frame802154_create() function.
uint8_t seq
Sequence number.
uint8_t dest_addr[8]
Destination address.
frame802154_aux_hdr_t aux_hdr
Aux security header.
uint8_t * payload
Pointer to 802.15.4 payload.
uint8_t src_addr[8]
Source address.
uint16_t src_pid
Source PAN ID.
frame802154_fcf_t fcf
Frame control field
uint16_t dest_pid
Destination PAN ID.
int payload_len
Length of payload field.
static uip_ds6_addr_t * addr
Pointer to a nbr cache entry.
Definition uip-nd6.c:107