aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-08-12 01:41:57 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-08-12 01:44:57 +0800
commite0009f10ca5b996025cad6aa66382fe9c25b001b (patch)
tree31a97e0ad91c55fd26f832ddb5a2020e5f044f4e /openbsc
parentc1fa794ed50ab5587a99a47bdfec6adcd1ec56c7 (diff)
gsm48: Add method to send a separate facility message...
Send a facility messages with notifySS/CNAP as payload to the phone... the function is not called from anywhere in the tree yet but I use it locally.
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/gsm_04_08.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c
index e10177d6d..f022c04a9 100644
--- a/openbsc/src/gsm_04_08.c
+++ b/openbsc/src/gsm_04_08.c
@@ -2,7 +2,7 @@
* 3GPP TS 04.08 version 7.21.0 Release 1998 / ETSI TS 100 940 V7.21.0 */
/* (C) 2008-2009 by Harald Welte <laforge@gnumonks.org>
- * (C) 2008, 2009 by Holger Hans Peter Freyther <zecke@selfish.org>
+ * (C) 2008-2010 by Holger Hans Peter Freyther <zecke@selfish.org>
*
* All Rights Reserved
*
@@ -41,6 +41,7 @@
#include <openbsc/gsm_subscriber.h>
#include <openbsc/gsm_04_11.h>
#include <openbsc/gsm_04_08.h>
+#include <openbsc/gsm_04_80.h>
#include <openbsc/abis_rsl.h>
#include <openbsc/chan_alloc.h>
#include <openbsc/paging.h>
@@ -104,6 +105,23 @@ static int gsm48_conn_sendmsg(struct msgb *msg, struct gsm_subscriber_connection
return gsm0808_submit_dtap(conn, msg, 0);
}
+int gsm48_cc_tx_notify_ss(struct gsm_trans *trans, const char *message)
+{
+ struct gsm48_hdr *gh;
+ struct msgb *ss_notify;
+
+ ss_notify = gsm0480_create_notifySS(message);
+ if (!ss_notify)
+ return -1;
+
+ gsm0480_wrap_invoke(ss_notify, GSM0480_OP_CODE_NOTIFY_SS, 0);
+ uint8_t *data = msgb_push(ss_notify, 1);
+ data[0] = ss_notify->len - 1;
+ gh = (struct gsm48_hdr *) msgb_push(ss_notify, sizeof(*gh));
+ gh->msg_type = GSM48_MT_CC_FACILITY;
+ return gsm48_conn_sendmsg(ss_notify, trans->conn, trans);
+}
+
static void release_security_operation(struct gsm_subscriber_connection *conn)
{
if (!conn->sec_operation)