diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2022-01-03 16:57:45 +0100 |
---|---|---|
committer | pespin <pespin@sysmocom.de> | 2022-01-07 13:02:56 +0000 |
commit | 604eaba2c34c7295b3f9edbc11a8b927da2f3300 (patch) | |
tree | c276462665d031aea46cf549bd02d2ad10bbcc05 /tests | |
parent | d3b016fec588d436e0d2a619e5d5a34af3f54b6b (diff) |
iuup: Submit RNL-STATUS-Initialization.ind upon rx of Init
This allows init-passive users to get the configured sizes for the RFCIs
and other similar information once engotiated with the peer.
Realted: OS#1937
Change-Id: I63ee780b4aa162ea097410b234e73984000c0965
Diffstat (limited to 'tests')
-rw-r--r-- | tests/iuup/iuup_test.c | 18 | ||||
-rw-r--r-- | tests/iuup/iuup_test.ok | 1 |
2 files changed, 14 insertions, 5 deletions
diff --git a/tests/iuup/iuup_test.c b/tests/iuup/iuup_test.c index 0c7dbff1..a58481d1 100644 --- a/tests/iuup/iuup_test.c +++ b/tests/iuup/iuup_test.c @@ -440,9 +440,17 @@ static int _passive_init_user_prim_cb(struct osmo_prim_hdr *oph, void *ctx) printf("%s()\n", __func__); - OSMO_ASSERT(OSMO_PRIM_HDR(&irp->oph) == OSMO_PRIM(OSMO_IUUP_RNL_DATA, PRIM_OP_INDICATION)); - printf("User: UL len=%u: %s\n", msgb_l3len(msg), - osmo_hexdump((const unsigned char *) msgb_l3(msg), msgb_l3len(msg))); + switch (_passive_init_user_rx_prim) { + case 0: + OSMO_ASSERT(OSMO_PRIM_HDR(&irp->oph) == OSMO_PRIM(OSMO_IUUP_RNL_STATUS, PRIM_OP_INDICATION)); + OSMO_ASSERT(irp->u.status.procedure == IUUP_PROC_INIT); + break; + case 1: + default: + OSMO_ASSERT(OSMO_PRIM_HDR(&irp->oph) == OSMO_PRIM(OSMO_IUUP_RNL_DATA, PRIM_OP_INDICATION)); + printf("User: UL len=%u: %s\n", msgb_l3len(msg), + osmo_hexdump((const unsigned char *) msgb_l3(msg), msgb_l3len(msg))); + } _passive_init_user_rx_prim++; msgb_free(oph->msg); @@ -496,7 +504,7 @@ void test_passive_init(void) memcpy(hdr14, iuup_initialization, sizeof(iuup_initialization)); OSMO_ASSERT((rc = osmo_iuup_tnl_prim_up(iui, tnp)) == 0); OSMO_ASSERT(_passive_init_transport_rx_prim == 1); /* We receive an Init ACK */ - OSMO_ASSERT(_passive_init_user_rx_prim == 0); + OSMO_ASSERT(_passive_init_user_rx_prim == 1); /* We receive the Status-Init.ind */ /* Send IuUP incoming data to the implementation: */ tnp = osmo_iuup_tnl_prim_alloc(iuup_test_ctx, OSMO_IUUP_TNL_UNITDATA, PRIM_OP_INDICATION, IUUP_MSGB_SIZE); @@ -505,7 +513,7 @@ void test_passive_init(void) memcpy(hdr0, iuup_data, sizeof(iuup_data)); OSMO_ASSERT((rc = osmo_iuup_tnl_prim_up(iui, tnp)) == 0); /* We receive it in RNL: */ - OSMO_ASSERT(_passive_init_user_rx_prim == 1); + OSMO_ASSERT(_passive_init_user_rx_prim == 2); /* Now in opposite direction, RNL->[IuuP]->TNL: */ rnp = osmo_iuup_rnl_prim_alloc(iuup_test_ctx, OSMO_IUUP_RNL_DATA, PRIM_OP_REQUEST, IUUP_MSGB_SIZE); diff --git a/tests/iuup/iuup_test.ok b/tests/iuup/iuup_test.ok index 54230968..681672bd 100644 --- a/tests/iuup/iuup_test.ok +++ b/tests/iuup/iuup_test.ok @@ -36,6 +36,7 @@ User: UL len=31: 08 55 6d 94 4c 71 a1 a0 81 e7 ea d2 04 24 44 80 00 0e cd 82 b8 _init_ack_transport_prim_cb() Transport: DL len=35: 01 00 e3 ff 08 55 6d 94 4c 71 a1 a0 81 e7 ea d2 04 24 44 80 00 0e cd 82 b8 11 18 00 00 97 c4 79 4e 77 40 sys={0.000000}, clock_override_set +_passive_init_user_prim_cb() _passive_init_transport_prim_cb() Transport: DL len=4: e4 00 24 00 _passive_init_user_prim_cb() |