75 uint8_t dest_addr_len;
82 CC_INLINE
static uint8_t
83 addr_len(uint8_t mode)
86 case FRAME802154_SHORTADDRMODE:
88 case FRAME802154_LONGADDRMODE:
99 memset(flen, 0,
sizeof(field_length_t));
103 flen->dest_pid_len = 2;
106 flen->src_pid_len = 2;
115 flen->src_pid_len = 0;
130 flen->aux_sec_len = 5;
133 flen->aux_sec_len = 6;
136 flen->aux_sec_len = 10;
139 flen->aux_sec_len = 14;
162 return 3 + flen.dest_pid_len + flen.dest_addr_len +
163 flen.src_pid_len + flen.src_addr_len + flen.aux_sec_len;
185 uint8_t *tx_frame_buffer;
190 if(3 + flen.dest_pid_len + flen.dest_addr_len +
191 flen.src_pid_len + flen.src_addr_len + flen.aux_sec_len > buf_len) {
198 tx_frame_buffer = buf;
209 tx_frame_buffer[2] = p->
seq;
213 if(flen.dest_pid_len == 2) {
214 tx_frame_buffer[pos++] = p->
dest_pid & 0xff;
215 tx_frame_buffer[pos++] = (p->
dest_pid >> 8) & 0xff;
219 for(c = flen.dest_addr_len; c > 0; c--) {
220 tx_frame_buffer[pos++] = p->
dest_addr[c - 1];
224 if(flen.src_pid_len == 2) {
225 tx_frame_buffer[pos++] = p->
src_pid & 0xff;
226 tx_frame_buffer[pos++] = (p->
src_pid >> 8) & 0xff;
230 for(c = flen.src_addr_len; c > 0; c--) {
231 tx_frame_buffer[pos++] = p->
src_addr[c - 1];
235 if(flen.aux_sec_len) {
299 for(c = 0; c < 8; c++) {
313 pf->
src_pid = p[0] + (p[1] << 8);
331 for(c = 0; c < 8; c++) {
354 return c > len ? 0 : c;