From 3415d41a8cea9930a70daf0c7fb6a0009ca7f0a3 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 21 Feb 2010 19:03:41 +0100 Subject: add msgb and tlv support bits required for openbsc gprs branch --- include/osmocore/tlv.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/osmocore/tlv.h') diff --git a/include/osmocore/tlv.h b/include/osmocore/tlv.h index 14c9910d..c733dbc9 100644 --- a/include/osmocore/tlv.h +++ b/include/osmocore/tlv.h @@ -190,6 +190,13 @@ static inline uint8_t *msgb_tv16_push(struct msgb *msg, uint8_t tag, uint16_t va return tv16_put(buf, tag, val); } +static inline uint8_t *msgb_tvlv_push(struct msgb *msg, uint8_t tag, uint16_t len, + const uint8_t *val) +{ + uint8_t *buf = msgb_push(msg, TVLV_GROSS_LEN(len)); + return tvlv_put(buf, tag, len, val); +} + /* TLV parsing */ struct tlv_p_entry { -- cgit v1.2.3