ContikiMAC: Create and parse ContikiMAC header in special framer; Expanded framer interface

to allow for creating and securing frames in advance; Create and secure frames in advance when sending bursts; Do neither recreate nor resecure frames that come from phase
This commit is contained in:
kkrentz 2014-04-26 02:39:51 -07:00
parent c15a05aee1
commit 2cf7d98cad
22 changed files with 353 additions and 128 deletions

View file

@ -405,6 +405,19 @@ queuebuf_update_attr_from_packetbuf(struct queuebuf *buf)
}
/*---------------------------------------------------------------------------*/
void
queuebuf_update_from_packetbuf(struct queuebuf *buf)
{
struct queuebuf_data *buframptr = queuebuf_load_to_ram(buf);
packetbuf_attr_copyto(buframptr->attrs, buframptr->addrs);
buframptr->len = packetbuf_copyto(buframptr->data);
#if WITH_SWAP
if(buf->location == IN_CFS) {
queuebuf_flush_tmpdata();
}
#endif
}
/*---------------------------------------------------------------------------*/
void
queuebuf_free(struct queuebuf *buf)
{
if(memb_inmemb(&bufmem, buf)) {