From e0009f10ca5b996025cad6aa66382fe9c25b001b Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 12 Aug 2010 01:41:57 +0800 Subject: 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. --- openbsc/src/gsm_04_08.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'openbsc') 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 - * (C) 2008, 2009 by Holger Hans Peter Freyther + * (C) 2008-2010 by Holger Hans Peter Freyther * * All Rights Reserved * @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -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) -- cgit v1.2.3