24 #include <osmocom/core/linuxlist.h>
50 struct gsm_bts_trx *trx;
79 #define MSGB_ABORT(msg, fmt, args ...) do { \
80 osmo_panic("msgb(%p): " fmt, msg, ## args); \
83 #define MSGB_ABORT(msg, fmt, args ...)
87 #define msgb_l1(m) ((void *)(m->l1h))
89 #define msgb_l2(m) ((void *)(m->l2h))
91 #define msgb_l3(m) ((void *)(m->l3h))
93 #define msgb_sms(m) ((void *)(m->l4h))
181 unsigned char *tmp = msgb->
tail;
183 MSGB_ABORT(msgb,
"Not enough tailroom msgb_push (%u < %u)\n",
197 space[0] = word & 0xFF;
207 space[0] = word >> 8 & 0xFF;
208 space[1] = word & 0xFF;
218 space[0] = word >> 24 & 0xFF;
219 space[1] = word >> 16 & 0xFF;
220 space[2] = word >> 8 & 0xFF;
221 space[3] = word & 0xFF;
230 unsigned char *tmp = msgb->
data -
len;
232 MSGB_ABORT(msgb,
"msgb too small to get %u (len %u)\n",
254 return space[0] << 8 | space[1];
263 return space[0] << 24 | space[1] << 16 | space[2] << 8 | space[3];
281 MSGB_ABORT(msgb,
"Not enough headroom msgb_push (%u < %u)\n",
318 return space[0] << 8 | space[1];
327 return space[0] << 24 | space[1] << 16 | space[2] << 8 | space[3];
386 osmo_static_assert(size > headroom, headroom_bigger);