Merge commit '430be849945688ae107b079db1e216329b1a1f06'
[osmocom-bb.git] / src / shared / libosmocore / include / osmocom / core / msgb.h
index 8665c2b..915c4a0 100644 (file)
 struct msgb {
        struct llist_head list;
 
+
        /* Part of which TRX logical channel we were received / transmitted */
        /* FIXME: move them into the control buffer */
-       struct gsm_bts_trx *trx;
+       union {
+               void *dst;
+               struct gsm_bts_trx *trx;
+       };
        struct gsm_lchan *lchan;
 
        /* the Layer1 header (if any) */
@@ -193,5 +197,7 @@ static inline struct msgb *msgb_alloc_headroom(int size, int headroom,
 uint8_t *msgb_data(const struct msgb *msg);
 uint16_t msgb_length(const struct msgb *msg);
 
+/* set the talloc context for msgb_alloc[_headroom] */
+void msgb_set_talloc_ctx(void *ctx);
 
 #endif /* _MSGB_H */