Added method to framer that returns the header length if the framer
would create a header with the current packet information. This allows sicslowpan to calculate the max payload size without consuming a sequence number or clearing/restoring the packet buffer.
This commit is contained in:
parent
dbb8f3ec13
commit
68730566a3
5 changed files with 42 additions and 15 deletions
|
@ -55,6 +55,12 @@ struct nullmac_hdr {
|
|||
linkaddr_t sender;
|
||||
};
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int
|
||||
hdr_length(void)
|
||||
{
|
||||
return sizeof(struct nullmac_hdr);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int
|
||||
create(void)
|
||||
|
@ -91,5 +97,5 @@ parse(void)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
const struct framer framer_nullmac = {
|
||||
create, parse
|
||||
hdr_length, create, parse
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue