aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/gsm_04_08_rr.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-09-02 14:13:51 +0200
committerHarald Welte <laforge@gnumonks.org>2019-09-06 23:09:54 +0200
commitbbd0bfff174e54eea66a611fb138eea8243494bf (patch)
tree6ce2ed0e55d2571e528e3f56b1859b1e3dc2db5c /src/osmo-bsc/gsm_04_08_rr.c
parentd102832d9fe197d4830067040535d3ded2c1024d (diff)
SMSCB: Send ETWS primary warning message via all dedicated channels
As soon as we have received an ETWS primary notification message from the CBC, we should transmit it as "RR Application Information" to all dedicated channels. Change-Id: I913d0237cffdcb95037da8489acef5f32a7fc02e
Diffstat (limited to 'src/osmo-bsc/gsm_04_08_rr.c')
-rw-r--r--src/osmo-bsc/gsm_04_08_rr.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/osmo-bsc/gsm_04_08_rr.c b/src/osmo-bsc/gsm_04_08_rr.c
index 7ff94adea..1fbbb5787 100644
--- a/src/osmo-bsc/gsm_04_08_rr.c
+++ b/src/osmo-bsc/gsm_04_08_rr.c
@@ -592,6 +592,28 @@ int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan,
return gsm48_sendmsg(msg);
}
+/* TS 44.018 section 9.1.53 */
+int gsm48_send_rr_app_info(struct gsm_lchan *lchan, uint8_t apdu_id, uint8_t apdu_flags,
+ const uint8_t *apdu_data, ssize_t apdu_data_len)
+{
+ struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 APP INFO");
+ struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh));
+
+ if ((apdu_id & 0xF0) || (apdu_flags & 0xF0)) {
+ msgb_free(msg);
+ return -EINVAL;
+ }
+
+ msg->lchan = lchan;
+ gh->proto_discr = GSM48_PDISC_RR;
+ gh->msg_type = GSM48_MT_RR_APP_INFO;
+
+ msgb_put_u8(msg, (apdu_flags << 4) | apdu_id);
+ msgb_lv_put(msg, apdu_data_len, apdu_data);
+
+ return gsm48_sendmsg(msg);
+}
+
/* 9.1.5 Channel mode modify: Modify the mode on the MS side */
int gsm48_lchan_modify(struct gsm_lchan *lchan, uint8_t mode)
{