introduce msgb_l2len() function
This commit is contained in:
parent
9b177760bb
commit
e021254b64
|
@ -56,6 +56,11 @@ extern struct msgb *msgb_dequeue(struct llist_head *queue);
|
||||||
#define msgb_l3(m) ((void *)(m->l3h))
|
#define msgb_l3(m) ((void *)(m->l3h))
|
||||||
#define msgb_sms(m) ((void *)(m->smsh))
|
#define msgb_sms(m) ((void *)(m->smsh))
|
||||||
|
|
||||||
|
static inline unsigned int msgb_l2len(const struct msgb *msgb)
|
||||||
|
{
|
||||||
|
return msgb->tail - (u_int8_t *)msgb_l2(msgb);
|
||||||
|
}
|
||||||
|
|
||||||
static inline unsigned int msgb_l3len(const struct msgb *msgb)
|
static inline unsigned int msgb_l3len(const struct msgb *msgb)
|
||||||
{
|
{
|
||||||
return msgb->tail - (u_int8_t *)msgb_l3(msgb);
|
return msgb->tail - (u_int8_t *)msgb_l3(msgb);
|
||||||
|
|
Loading…
Reference in New Issue