introduce msgb_l3len() function

This commit is contained in:
Harald Welte 2009-02-15 17:18:37 +00:00
parent d4c9bf3c5a
commit 0a23990be8
1 changed files with 5 additions and 0 deletions

View File

@ -56,6 +56,11 @@ extern struct msgb *msgb_dequeue(struct llist_head *queue);
#define msgb_l3(m) ((void *)(m->l3h))
#define msgb_sms(m) ((void *)(m->smsh))
static inline unsigned int msgb_l3len(const struct msgb *msgb)
{
return msgb->tail - (u_int8_t *)msgb_l3(msgb);
}
static inline unsigned int msgb_headlen(const struct msgb *msgb)
{
return msgb->len - msgb->data_len;