aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-01-23 15:06:40 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-02-01 14:02:11 +0100
commitad14ff96c376bdf60f017c067ba090c2908c6fc6 (patch)
treec69d97c960565d375cc2a1143715f9f18ddda6b4
parent32b821005e69813cea335f6b88568db6144111b9 (diff)
cs RAB: add nAS_SynchronisationIndicator
This is mimicking the IEs found in a trace from a production 3G environment. We have no reason to add this other than knowing that other operators seem to do this. This came up while trying to fix voice RAB for the nano3G, but this patch had no effect on that. Now that it's here, we might as well keep it. Change-Id: I14c22b0befb308bac2eded662fe13a58c8478743
-rw-r--r--src/ranap_msg_factory.c10
-rw-r--r--src/tests/test-ranap.ok20
2 files changed, 19 insertions, 11 deletions
diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c
index 16a9d03..cd2ddfc 100644
--- a/src/ranap_msg_factory.c
+++ b/src/ranap_msg_factory.c
@@ -588,6 +588,14 @@ static RANAP_RAB_Parameters_t *new_rab_par_voice(void)
return rab;
}
+static RANAP_NAS_SynchronisationIndicator_t *new_rab_nas_sync_ind(int val)
+{
+ uint8_t val_buf = (val / 10) << 4;
+ RANAP_NAS_SynchronisationIndicator_t *nsi = CALLOC(1, sizeof(*nsi));
+ BIT_STRING_fromBuf(nsi, &val_buf, 4);
+ return nsi;
+}
+
static RANAP_RAB_Parameters_t *new_rab_par_data(uint32_t dl_max_bitrate, uint32_t ul_max_bitrate)
{
RANAP_RAB_Parameters_t *rab = CALLOC(1, sizeof(*rab));
@@ -729,7 +737,7 @@ struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, uint32_t rtp_ip,
RANAP_RAB_SetupOrModifyItemFirst_t first;
memset(&first, 0, sizeof(first));
assign_new_ra_id(&first.rAB_ID, rab_id);
- //first.nAS_SynchronisationIndicator = FIXME;
+ first.nAS_SynchronisationIndicator = new_rab_nas_sync_ind(60);
first.rAB_Parameters = new_rab_par_voice();
first.userPlaneInformation = new_upi(RANAP_UserPlaneMode_support_mode_for_predefined_SDU_sizes, 1); /* 2? */
first.transportLayerInformation = new_transp_info_rtp(rtp_ip, rtp_port,
diff --git a/src/tests/test-ranap.ok b/src/tests/test-ranap.ok
index bda3c8e..dc959eb 100644
--- a/src/tests/test-ranap.ok
+++ b/src/tests/test-ranap.ok
@@ -88,10 +88,10 @@ Decoded Cause Misc=115
<id>53</id>
<firstCriticality><reject/></firstCriticality>
<firstValue>
- 38 02 D8 01 2F A7 20 2F A8 00 00 F4 4C 08 0A 02
- 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28
- 14 00 3C 40 00 00 00 50 3D 02 00 02 0D C0 35 00
- 01 0A 0B 0C 0D 40 09 26 00 00
+ 78 02 CD 80 10 2F A7 20 2F A8 00 00 F4 4C 08 0A
+ 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22
+ 28 14 00 3C 40 00 00 00 50 3D 02 00 02 0D C0 35
+ 00 01 0A 0B 0C 0D 40 09 26 00 00
</firstValue>
<secondCriticality><ignore/></secondCriticality>
<secondValue>00</secondValue>
@@ -100,14 +100,14 @@ Decoded Cause Misc=115
<id>54</id>
<criticality><ignore/></criticality>
<value>
- 00 00 01 00 35 00 3A 38 02 D8 01 2F A7 20 2F A8
- 00 00 F4 4C 08 0A 02 80 00 51 40 00 27 20 28 14
- 00 67 40 00 00 22 28 14 00 3C 40 00 00 00 50 3D
- 02 00 02 0D C0 35 00 01 0A 0B 0C 0D 40 09 26 00
- 00 40 01 00
+ 00 00 01 00 35 00 3B 78 02 CD 80 10 2F A7 20 2F
+ A8 00 00 F4 4C 08 0A 02 80 00 51 40 00 27 20 28
+ 14 00 67 40 00 00 22 28 14 00 3C 40 00 00 00 50
+ 3D 02 00 02 0D C0 35 00 01 0A 0B 0C 0D 40 09 26
+ 00 00 40 01 00
</value>
</RANAP_IE>
-00 00 00 4b 00 00 01 00 36 40 44 00 00 01 00 35 00 3a 38 02 d8 01 2f a7 20 2f a8 00 00 f4 4c 08 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 3d 02 00 02 0d c0 35 00 01 0a 0b 0c 0d 40 09 26 00 00 40 01 00
+00 00 00 4c 00 00 01 00 36 40 45 00 00 01 00 35 00 3b 78 02 cd 80 10 2f a7 20 2f a8 00 00 f4 4c 08 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 3d 02 00 02 0d c0 35 00 01 0a 0b 0c 0d 40 09 26 00 00 40 01 00
==> RAB ASSIGNMENT COMMAND (DATA)
<RANAP_ProtocolIE-FieldPair>