diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-09-13 05:36:32 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-09-13 14:27:26 +0000 |
commit | 2c79d55934f033dd18a61c309c0487f3c5d81961 (patch) | |
tree | 41fef7d9992afad2c9ef2ae63b4551135f61ccfa | |
parent | 3a9ff11e574fa7ee19b1062b2c90151dbf7f0e27 (diff) |
gsm0808: implement BSSMAP Classmark Request
Related: OS#3043
Change-Id: I4a2e1d3923e33912579c4180aa1ff8e8f5abb7e7
-rw-r--r-- | include/osmocom/gsm/gsm0808.h | 1 | ||||
-rw-r--r-- | src/gsm/gsm0808.c | 13 | ||||
-rw-r--r-- | src/gsm/libosmogsm.map | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h index 5ae0af83..f4fc7c4c 100644 --- a/include/osmocom/gsm/gsm0808.h +++ b/include/osmocom/gsm/gsm0808.h @@ -51,6 +51,7 @@ struct msgb *gsm0808_create_cipher(const struct gsm0808_encrypt_info *ei, const uint8_t *cipher_response_mode); struct msgb *gsm0808_create_cipher_complete(struct msgb *layer3, uint8_t alg_id); struct msgb *gsm0808_create_cipher_reject(uint8_t cause); +struct msgb *gsm0808_create_classmark_request(); struct msgb *gsm0808_create_classmark_update(const uint8_t *cm2, uint8_t cm2_len, const uint8_t *cm3, uint8_t cm3_len); struct msgb *gsm0808_create_sapi_reject(uint8_t link_id); diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c index e3b10d0c..9a9f70ee 100644 --- a/src/gsm/gsm0808.c +++ b/src/gsm/gsm0808.c @@ -341,6 +341,19 @@ struct msgb *gsm0808_create_lcls_notification(enum gsm0808_lcls_status status, b return msg; } +/*! Create BSSMAP Classmark Request message + * \returns callee-allocated msgb with BSSMAP Classmark Request message */ +struct msgb *gsm0808_create_classmark_request() +{ + struct msgb *msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM, + "classmark-request"); + if (!msg) + return NULL; + + msgb_v_put(msg, BSS_MAP_MSG_CLASSMARK_RQST); + msg->l3h = msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg)); + return msg; +} /*! Create BSSMAP Classmark Update message * \param[in] cm2 Classmark 2 diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 60d6ed84..0c40c88c 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -156,6 +156,7 @@ gsm0808_create_ass_fail; gsm0808_create_cipher; gsm0808_create_cipher_complete; gsm0808_create_cipher_reject; +gsm0808_create_classmark_request; gsm0808_create_classmark_update; gsm0808_create_clear_command; gsm0808_create_clear_complete; |