summaryrefslogtreecommitdiffstats
path: root/include/osmocore
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-02-24 22:52:58 +0100
committerHarald Welte <laforge@gnumonks.org>2010-02-24 22:52:58 +0100
commitf7d797424a89a96a5d5f8c98528f8ba87100894f (patch)
tree4cff9e0f486e45f4d0b1e78a11c503ed56720d8f /include/osmocore
parented71b8c5978ce6fe9d331b216ff7270fb9473d01 (diff)
parent3415d41a8cea9930a70daf0c7fb6a0009ca7f0a3 (diff)
Merge remote branch 'origin/master'
Diffstat (limited to 'include/osmocore')
-rw-r--r--include/osmocore/msgb.h13
-rw-r--r--include/osmocore/tlv.h7
2 files changed, 19 insertions, 1 deletions
diff --git a/include/osmocore/msgb.h b/include/osmocore/msgb.h
index 131f920a..e2755ef3 100644
--- a/include/osmocore/msgb.h
+++ b/include/osmocore/msgb.h
@@ -35,9 +35,20 @@ struct msgb {
struct gsm_bts_trx *trx;
struct gsm_lchan *lchan;
+ /* the A-bis layer 2 header: OML, RSL(RLL), NS */
unsigned char *l2h;
+ /* the layer 3 header. For OML: FOM; RSL: 04.08; GPRS: BSSGP */
unsigned char *l3h;
- unsigned char *smsh;
+
+ /* the layer 4 header */
+ union {
+ unsigned char *smsh;
+ unsigned char *llch;
+ };
+
+ /* the layer 5 header, GPRS: GMM header */
+ unsigned char *gmmh;
+ uint32_t tlli;
uint16_t data_len;
uint16_t len;
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 {