aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gsup/gsup_test.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-11-13 02:06:15 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-12-18 21:52:06 +0700
commitf9ee8da0cda6a8989c706e618915d09c9cffd0f4 (patch)
tree8abca8cf5ed4576b2b39b3f4dfe3e338f44e92a1 /tests/gsup/gsup_test.c
parentc2628317cc3482262c80b93cbfb2cbe960772558 (diff)
GSUP/SMS: introduce READY-FOR-SM message
According to 3GPP TS 29.002, section 12.4, MAP-READY-FOR-SM is used between the MSC and VLR as well as between the VLR and the HLR to indicate that a subscriber has memory available for SMS. This change replicates this service in GSUP as READY_FOR_SM_*. The only mandatory IE for this service (excluding Invoke ID) is 'Alert Reason' that is replicated by OSMO_GSUP_SM_ALERT_RSN_IE. Change-Id: Ic37f3b2114b8095cfce22977e67133b9103942e3 Related Change-Id: (docs) I549b6c8840a1e86caac09e77fb8bc5042d939e62 Related Change-Id: (TTCN) If2256607527ecfcb10285583332fb8b0515d7c78 Related: OS#3587
Diffstat (limited to 'tests/gsup/gsup_test.c')
-rw-r--r--tests/gsup/gsup_test.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/gsup/gsup_test.c b/tests/gsup/gsup_test.c
index 09368933..b3a8c772 100644
--- a/tests/gsup/gsup_test.c
+++ b/tests/gsup/gsup_test.c
@@ -280,6 +280,15 @@ static void test_gsup_messages_dec_enc(void)
0xde, 0xad, 0xbe, 0xef,
};
+ static const uint8_t send_ready_for_sm_ind[] = {
+ 0x2c, /* OSMO_GSUP_MSGT_READY_FOR_SM_REQUEST */
+ TEST_IMSI_IE,
+
+ /* SM related IEs */
+ 0x46, 0x01, /* Alert reason */
+ 0x02, /* Memory Available (SMMA) */
+ };
+
static const struct test {
char *name;
const uint8_t *data;
@@ -327,6 +336,8 @@ static void test_gsup_messages_dec_enc(void)
send_mo_mt_forward_sm_rsp, sizeof(send_mo_mt_forward_sm_rsp)},
{"MO-/MT-ForwardSM Error",
send_mo_mt_forward_sm_err, sizeof(send_mo_mt_forward_sm_err)},
+ {"ReadyForSM (MSC -> SMSC) Indication",
+ send_ready_for_sm_ind, sizeof(send_ready_for_sm_ind)},
};
printf("Test GSUP message decoding/encoding\n");
@@ -394,7 +405,7 @@ static void test_gsup_messages_dec_enc(void)
* FIXME: share the maximal IE value somehow
* in order to avoid manual updating of this
*/
- OSMO_ASSERT(t->data[j+0] <= OSMO_GSUP_SM_RP_MMS_IE);
+ OSMO_ASSERT(t->data[j+0] <= OSMO_GSUP_SM_ALERT_RSN_IE);
OSMO_ASSERT(t->data[j+1] <= ie_end - j - 2);
ie_end = j;