aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/abis_rsl.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-07-21 15:54:32 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-07-23 17:16:48 +0800
commit8cb4a0f35da0431fec7132dd42273d4d754e6d93 (patch)
tree4d74d70cf6a0283596b68670418025ca07a13d52 /openbsc/src/abis_rsl.c
parentc702b7528f42932c5cdd0dc404e3cbd869416e43 (diff)
rsl: Add method to send a SMSCB inside a SMS BROADCAST COMMAND
* Untested code for sending the SMS BROADCAST COMMAND.
Diffstat (limited to 'openbsc/src/abis_rsl.c')
-rw-r--r--openbsc/src/abis_rsl.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/openbsc/src/abis_rsl.c b/openbsc/src/abis_rsl.c
index 161c4d3b..5093d793 100644
--- a/openbsc/src/abis_rsl.c
+++ b/openbsc/src/abis_rsl.c
@@ -1869,3 +1869,25 @@ int rsl_number_of_paging_subchannels(struct gsm_bts *bts)
* (bts->si_common.chan_desc.bs_pa_mfrms + 2);
}
}
+
+int rsl_sms_cb_command(struct gsm_bts *bts, uint8_t chan_number,
+ uint8_t cb_command, const uint8_t *data, int len)
+{
+ struct abis_rsl_dchan_hdr *dh;
+ struct msgb *cb_cmd;
+
+ cb_cmd = rsl_msgb_alloc();
+ if (!cb_cmd)
+ return -1;
+
+ dh = (struct abis_rsl_dchan_hdr *) msgb_put(cb_cmd, sizeof*dh);
+ init_dchan_hdr(dh, RSL_MT_SMS_BC_CMD);
+ dh->chan_nr = RSL_CHAN_SDCCH4_ACCH; /* TODO: check the chan config */
+
+ msgb_tv_put(cb_cmd, RSL_IE_CB_CMD_TYPE, cb_command);
+ msgb_tlv_put(cb_cmd, RSL_IE_SMSCB_MSG, len, data);
+
+ cb_cmd->trx = bts->c0;
+
+ return abis_rsl_sendmsg(cb_cmd);
+}