diff options
-rw-r--r-- | include/osmocom/gsm/gsm0808.h | 1 | ||||
-rw-r--r-- | src/gsm/gsm0808.c | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h index 5380dd9e..5127c003 100644 --- a/include/osmocom/gsm/gsm0808.h +++ b/include/osmocom/gsm/gsm0808.h @@ -26,6 +26,7 @@ struct msgb; struct msgb *gsm0808_create_layer3(struct msgb *msg, uint16_t netcode, uint16_t countrycode, int lac, uint16_t ci); struct msgb *gsm0808_create_reset(void); +struct msgb *gsm0808_create_reset_ack(void); struct msgb *gsm0808_create_clear_command(uint8_t reason); struct msgb *gsm0808_create_clear_complete(void); struct msgb *gsm0808_create_cipher_complete(struct msgb *layer3, uint8_t alg_id); diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c index 30098278..f67ca78c 100644 --- a/src/gsm/gsm0808.c +++ b/src/gsm/gsm0808.c @@ -76,6 +76,19 @@ struct msgb *gsm0808_create_reset(void) return msg; } +struct msgb *gsm0808_create_reset_ack(void) +{ + struct msgb *msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM, + "bssmap: reset ack"); + if (!msg) + return NULL; + + msgb_v_put(msg, BSS_MAP_MSG_RESET_ACKNOWLEDGE); + msg->l3h = msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg)); + + return msg; +} + struct msgb *gsm0808_create_clear_complete(void) { struct msgb *msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM, |