aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2016-12-02 05:21:45 +0100
committerAlexander Couzens <lynxis@fe80.eu>2017-03-23 02:10:21 +0100
commit16dcf2ae221a3a862fbbb958f5e1e2ecd6b3f7fa (patch)
tree891197b64da1ea681be518b2f4eed47b10bd01e8 /openbsc/src/libbsc
parentbaaf3e242ecfedf43511ec9d11336d9f2f04ed2e (diff)
libbsc: add rsl_ericsson_imm_assign_cmd() which reply with a confirmation message
ericsson can handle a reference at the end of a imm assign command which is used in the confirm response. The confirm response is only sent if the trailer is present. Change-Id: I88560291b5a3a3d7a0bac4d3c089b45f1f6b297f
Diffstat (limited to 'openbsc/src/libbsc')
-rw-r--r--openbsc/src/libbsc/abis_rsl.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index 91cbd46e4..5ae707c14 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -1048,7 +1048,7 @@ int imsi_str2bcd(uint8_t *bcd_out, const char *str_in)
}
/* Chapter 8.5.6 */
-int rsl_imm_assign_cmd(struct gsm_bts *bts, uint8_t len, uint8_t *val)
+struct msgb *rsl_imm_assign_cmd_common(struct gsm_bts *bts, uint8_t len, uint8_t *val)
{
struct msgb *msg = rsl_msgb_alloc();
struct abis_rsl_dchan_hdr *dh;
@@ -1071,6 +1071,29 @@ int rsl_imm_assign_cmd(struct gsm_bts *bts, uint8_t len, uint8_t *val)
}
msg->dst = bts->c0->rsl_link;
+ return msg;
+}
+
+/* Chapter 8.5.6 */
+int rsl_imm_assign_cmd(struct gsm_bts *bts, uint8_t len, uint8_t *val)
+{
+ struct msgb *msg = rsl_imm_assign_cmd_common(bts, len, val);
+ if (!msg)
+ return 1;
+ return abis_rsl_sendmsg(msg);
+}
+
+/* Chapter 8.5.6 */
+int rsl_ericsson_imm_assign_cmd(struct gsm_bts *bts, uint32_t tlli, uint8_t len, uint8_t *val)
+{
+ struct msgb *msg = rsl_imm_assign_cmd_common(bts, len, val);
+ if (!msg)
+ return 1;
+
+ /* ericsson can handle a reference at the end of the message which is used in
+ * the confirm message. The confirm message is only sent if the trailer is present */
+ msgb_put_u8(msg, RSL_IE_ERIC_MOBILE_ID);
+ msgb_put_u32(msg, tlli);
return abis_rsl_sendmsg(msg);
}