From fb4433a129ca7b0757baee834a1e5a6ba4c5bd85 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 7 Oct 2009 09:49:30 +0200 Subject: [bssap] Implement SAPI "N" Reject message This message will be needed when no RLL connection on a different SAPI can be established or we don't want to establish it. --- openbsc/include/openbsc/bssap.h | 3 ++- openbsc/src/bssap.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) (limited to 'openbsc') diff --git a/openbsc/include/openbsc/bssap.h b/openbsc/include/openbsc/bssap.h index b6f6c891d..1db026525 100644 --- a/openbsc/include/openbsc/bssap.h +++ b/openbsc/include/openbsc/bssap.h @@ -72,7 +72,7 @@ enum BSS_MAP_MSG_TYPE { BSS_MAP_MSG_CLEAR_RQST = 34, BSS_MAP_MSG_RESERVED_1 = 35, BSS_MAP_MSG_RESERVED_2 = 36, - BSS_MAP_MSG_SAPI_ = 37, + BSS_MAP_MSG_SAPI_N_REJECT = 37, BSS_MAP_MSG_CONFUSION = 38, /* OTHER CONNECTION RELATED MESSAGES */ @@ -273,6 +273,7 @@ struct msgb *bssmap_create_reset(void); struct msgb *bssmap_create_clear_complete(void); struct msgb *bssmap_create_cipher_complete(struct msgb *layer3, int bsc_enc_algo); struct msgb *bssmap_create_cipher_reject(u_int8_t cause); +struct msgb *bssmap_create_sapi_reject(u_int8_t link_id); int dtap_rcvmsg(struct gsm_lchan *lchan, struct msgb *msg, unsigned int length); struct msgb *dtap_create_msg(struct msgb *msg_l3, u_int8_t link_id); diff --git a/openbsc/src/bssap.c b/openbsc/src/bssap.c index ad52827bc..061d6cd50 100644 --- a/openbsc/src/bssap.c +++ b/openbsc/src/bssap.c @@ -427,6 +427,22 @@ struct msgb *bssmap_create_cipher_reject(u_int8_t cause) return msg; } +struct msgb *bssmap_create_sapi_reject(u_int8_t link_id) +{ + struct msgb *msg = msgb_alloc(30, "bssmap: sapi 'n' reject"); + if (!msg) + return NULL; + + msg->l3h = msgb_put(msg, 5); + msg->l3h[0] = BSSAP_MSG_BSS_MANAGEMENT; + msg->l3h[1] = 3; + msg->l3h[2] = BSS_MAP_MSG_SAPI_N_REJECT; + msg->l3h[3] = link_id; + msg->l3h[4] = GSM0808_CAUSE_BSS_NOT_EQUIPPED; + + return msg; +} + struct msgb *dtap_create_msg(struct msgb *msg_l3, u_int8_t link_id) { struct dtap_header *header; -- cgit v1.2.3