Changeset fdd0a700930bdd04bc8827ef88dc5039ecc5b6ce

Show
Ignore:
Timestamp:
03/01/10 22:30:51 (6 months ago)
Author:
Harald Welte <laforge@gnumonks.org>
Parents:
d284cd9f43a6954be338d85470a17ac6796b56d5
Children:
f08eabf2341de43993918246e89ce30c3651f378
git-committer:
Harald Welte <laforge@gnumonks.org> / 2010-03-01T22:30:51Z+0100
Message:

add msgb_l1() and msgb_l1len() inline functions

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • include/osmocore/msgb.h

    r00096ac rfdd0a700  
    6868extern void msgb_reset(struct msgb *m); 
    6969 
     70#define msgb_l1(m)      ((void *)(m->l1h)) 
    7071#define msgb_l2(m)      ((void *)(m->l2h)) 
    7172#define msgb_l3(m)      ((void *)(m->l3h)) 
    7273#define msgb_sms(m)     ((void *)(m->smsh)) 
     74 
     75static inline unsigned int msgb_l1len(const struct msgb *msgb) 
     76{ 
     77        return msgb->tail - (uint8_t *)msgb_l1(msgb); 
     78} 
    7379 
    7480static inline unsigned int msgb_l2len(const struct msgb *msgb)