summaryrefslogtreecommitdiffstats
path: root/src/gsm0808.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-10-27 11:49:24 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-10-27 11:53:23 +0200
commita3f05d86095e5f67ca5b62702b0c4ba0324411a3 (patch)
tree64a1c769be2061a53bc6be76373c850b552ae491 /src/gsm0808.c
parent131bc80b967fb62c31e8f3badb5b15383df4ae0a (diff)
gsm0808: Add a method to create a clear command message.
Use the msgb_tv_put functions for putting the data into the message. Do not support the extended error reports.
Diffstat (limited to 'src/gsm0808.c')
-rw-r--r--src/gsm0808.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gsm0808.c b/src/gsm0808.c
index 636c2117..2424d8cb 100644
--- a/src/gsm0808.c
+++ b/src/gsm0808.c
@@ -108,6 +108,18 @@ struct msgb *gsm0808_create_clear_complete(void)
return msg;
}
+struct msgb *gsm0808_create_clear_command(uint8_t reason)
+{
+ struct msgb *msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM,
+ "bssmap: clear command");
+ if (!msg)
+ return NULL;
+
+ msg->l3h = msgb_tv_put(msg, BSSAP_MSG_BSS_MANAGEMENT, 2);
+ msgb_tv_put(msg, BSS_MAP_MSG_CLEAR_CMD, reason);
+ return msg;
+}
+
struct msgb *gsm0808_create_cipher_complete(struct msgb *layer3, uint8_t alg_id)
{
struct msgb *msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM,