commit | 9a3dec0c01c67fd6ee10e499fc2abb139d077a2c | [log] [tgz] |
---|---|---|
author | Holger Hans Peter Freyther <zecke@selfish.org> | Sun May 16 08:15:40 2010 +0800 |
committer | Holger Hans Peter Freyther <zecke@selfish.org> | Sun May 16 08:15:40 2010 +0800 |
tree | 8276da23417c6136b6db1770aa8c085c818be7ba | |
parent | 5dcef3c8b109bd2ff41cdf6ecf84e624291892e1 [diff] |
gsm0808: Add API to wrap a GSM48 msg with a BSSMAP/DTAP msg.
diff --git a/src/gsm0808.c b/src/gsm0808.c index 114ddbf..1dc035b 100644 --- a/src/gsm0808.c +++ b/src/gsm0808.c
@@ -266,6 +266,14 @@ return msg; } +void gsm0808_prepend_dtap_header(struct msgb *msg, uint8_t link_id) +{ + uint8_t *hh = msgb_push(msg, 3); + hh[0] = BSSAP_MSG_DTAP; + hh[1] = link_id; + hh[2] = msg->len - 3; +} + static const struct tlv_definition bss_att_tlvdef = { .def = { [GSM0808_IE_IMSI] = { TLV_TYPE_TLV },