aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2009-10-07 09:49:30 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2009-11-20 17:35:45 +0100
commitfb4433a129ca7b0757baee834a1e5a6ba4c5bd85 (patch)
treedaf4c9f19891cf2e539e1f3a1c1e29d22465ea45
parentd954dcf9e1178b3f8709831fba47bb54141f486b (diff)
[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.
-rw-r--r--openbsc/include/openbsc/bssap.h3
-rw-r--r--openbsc/src/bssap.c16
2 files changed, 18 insertions, 1 deletions
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;