diff options
Diffstat (limited to 'openbsc/tests/sgsn/sgsn_test.c')
-rw-r--r-- | openbsc/tests/sgsn/sgsn_test.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c index afff30f32..3fb359b8b 100644 --- a/openbsc/tests/sgsn/sgsn_test.c +++ b/openbsc/tests/sgsn/sgsn_test.c @@ -174,7 +174,7 @@ static struct sgsn_mm_ctx *alloc_mm_ctx(uint32_t tlli, struct gprs_ra_id *raid) lle = gprs_lle_get_or_create(tlli, 3); ctx = sgsn_mm_ctx_alloc(tlli, raid); ctx->mm_state = GMM_REGISTERED_NORMAL; - ctx->llme = lle->llme; + ctx->gb.llme = lle->llme; ictx = sgsn_mm_ctx_by_tlli(tlli, raid); OSMO_ASSERT(ictx == ctx); @@ -729,7 +729,7 @@ static void test_gmm_detach(void) ctx = alloc_mm_ctx(local_tlli, &raid); /* inject the detach */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, detach_req, ARRAY_SIZE(detach_req)); /* verify that a single message (hopefully the Detach Accept) has been @@ -770,7 +770,7 @@ static void test_gmm_detach_power_off(void) ctx = alloc_mm_ctx(local_tlli, &raid); /* inject the detach */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, detach_req, ARRAY_SIZE(detach_req)); /* verify that no message (and therefore no Detach Accept) has been @@ -967,14 +967,14 @@ static void test_gmm_attach(int retry) OSMO_ASSERT(sgsn_tx_counter == 1); /* inject the identity response (IMEI) */ - send_0408_message(ctx->llme, foreign_tlli, &raid, + send_0408_message(ctx->gb.llme, foreign_tlli, &raid, ident_resp_imei, ARRAY_SIZE(ident_resp_imei)); /* we expect an identity request (IMSI) */ OSMO_ASSERT(sgsn_tx_counter == 1); /* inject the identity response (IMSI) */ - send_0408_message(ctx->llme, foreign_tlli, &raid, + send_0408_message(ctx->gb.llme, foreign_tlli, &raid, ident_resp_imsi, ARRAY_SIZE(ident_resp_imsi)); /* check that the MM context has not been removed due to a failed @@ -996,7 +996,7 @@ retry_attach_req: /* we got an auth & ciph request */ /* inject the auth & ciph response */ - send_0408_message(ctx->llme, foreign_tlli, &raid, + send_0408_message(ctx->gb.llme, foreign_tlli, &raid, auth_ciph_resp, ARRAY_SIZE(auth_ciph_resp)); /* check that the MM context has not been removed due to a @@ -1018,7 +1018,7 @@ retry_attach_req: local_tlli = gprs_tmsi2tlli(ptmsi1, TLLI_LOCAL); /* inject the attach complete */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, attach_compl, ARRAY_SIZE(attach_compl)); OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL); @@ -1027,7 +1027,7 @@ retry_attach_req: OSMO_ASSERT(sgsn_tx_counter == 0); /* inject the detach */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, detach_req, ARRAY_SIZE(detach_req)); /* verify that things are gone */ @@ -1555,14 +1555,14 @@ static void test_gmm_cancel(void) OSMO_ASSERT(sgsn_tx_counter == 1); /* inject the identity response (IMEI) */ - send_0408_message(ctx->llme, foreign_tlli, &raid, + send_0408_message(ctx->gb.llme, foreign_tlli, &raid, ident_resp_imei, ARRAY_SIZE(ident_resp_imei)); /* we expect an identity request (IMSI) */ OSMO_ASSERT(sgsn_tx_counter == 1); /* inject the identity response (IMSI) */ - send_0408_message(ctx->llme, foreign_tlli, &raid, + send_0408_message(ctx->gb.llme, foreign_tlli, &raid, ident_resp_imsi, ARRAY_SIZE(ident_resp_imsi)); /* check that the MM context has not been removed due to a failed @@ -1580,7 +1580,7 @@ static void test_gmm_cancel(void) local_tlli = gprs_tmsi2tlli(ptmsi1, TLLI_LOCAL); /* inject the attach complete */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, foreign_tlli, &raid, attach_compl, ARRAY_SIZE(attach_compl)); OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL); @@ -1707,7 +1707,7 @@ static void test_gmm_ptmsi_allocation(void) OSMO_ASSERT(sgsn_tx_counter == 1); /* inject the identity response (IMEI) */ - send_0408_message(ctx->llme, foreign_tlli, &raid, + send_0408_message(ctx->gb.llme, foreign_tlli, &raid, ident_resp_imei, ARRAY_SIZE(ident_resp_imei)); /* check that the MM context has not been removed due to a failed @@ -1740,7 +1740,7 @@ static void test_gmm_ptmsi_allocation(void) /* inject the attach complete */ local_tlli = gprs_tmsi2tlli(ptmsi1, TLLI_LOCAL); - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, attach_compl, ARRAY_SIZE(attach_compl)); /* we don't expect a response */ @@ -1753,7 +1753,7 @@ static void test_gmm_ptmsi_allocation(void) printf(" - Repeated RA Update Request\n"); /* inject the RA update request */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, ra_upd_req, ARRAY_SIZE(ra_upd_req)); /* we expect an RA update accept */ @@ -1766,7 +1766,7 @@ static void test_gmm_ptmsi_allocation(void) ptmsi2 = ctx->p_tmsi; /* repeat the RA update request */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, ra_upd_req, ARRAY_SIZE(ra_upd_req)); /* we expect an RA update accept */ @@ -1780,7 +1780,7 @@ static void test_gmm_ptmsi_allocation(void) /* inject the RA update complete */ local_tlli = gprs_tmsi2tlli(ptmsi2, TLLI_LOCAL); - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, ra_upd_complete, ARRAY_SIZE(ra_upd_complete)); /* we don't expect a response */ @@ -1791,7 +1791,7 @@ static void test_gmm_ptmsi_allocation(void) OSMO_ASSERT(ctx->p_tmsi == ptmsi2); /* inject the detach */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, detach_req, ARRAY_SIZE(detach_req)); /* verify that things are gone */ @@ -1931,7 +1931,7 @@ static void test_gmm_routing_areas(void) OSMO_ASSERT(last_dl_parse_ctx.tlli == ms_tlli); /* inject the identity response (IMEI) */ - send_0408_message(ctx->llme, ms_tlli, &raid1, + send_0408_message(ctx->gb.llme, ms_tlli, &raid1, ident_resp_imei, ARRAY_SIZE(ident_resp_imei)); /* check that the MM context has not been removed due to a failed @@ -1951,7 +1951,7 @@ static void test_gmm_routing_areas(void) /* inject the attach complete */ ms_tlli = gprs_tmsi2tlli(ptmsi1, TLLI_LOCAL); - send_0408_message(ctx->llme, ms_tlli, &raid1, + send_0408_message(ctx->gb.llme, ms_tlli, &raid1, attach_compl, ARRAY_SIZE(attach_compl)); /* we don't expect a response */ @@ -1964,7 +1964,7 @@ static void test_gmm_routing_areas(void) printf(" - RA Update Request (RA 1 -> RA 1)\n"); /* inject the RA update request */ - send_0408_message(ctx->llme, ms_tlli, &raid1, + send_0408_message(ctx->gb.llme, ms_tlli, &raid1, ra_upd_req1, ARRAY_SIZE(ra_upd_req1)); /* we expect an RA update accept */ @@ -1983,7 +1983,7 @@ static void test_gmm_routing_areas(void) /* inject the RA update complete */ ms_tlli = gprs_tmsi2tlli(ptmsi1, TLLI_LOCAL); - send_0408_message(ctx->llme, ms_tlli, &raid1, + send_0408_message(ctx->gb.llme, ms_tlli, &raid1, ra_upd_complete, ARRAY_SIZE(ra_upd_complete)); /* we don't expect a response */ @@ -1992,7 +1992,7 @@ static void test_gmm_routing_areas(void) OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL); OSMO_ASSERT(ctx->p_tmsi_old == 0); OSMO_ASSERT(ctx->p_tmsi == ptmsi1); - OSMO_ASSERT(ctx->tlli == ms_tlli); + OSMO_ASSERT(ctx->gb.tlli == ms_tlli); printf(" - RA Update Request (RA 1 -> RA 2)\n"); @@ -2000,7 +2000,7 @@ static void test_gmm_routing_areas(void) ms_tlli = gprs_tmsi2tlli(ptmsi1, TLLI_FOREIGN); /* It is coming from RA 1 => ra_upd_req1 */ - send_0408_message(ctx->llme, ms_tlli, &raid2, + send_0408_message(ctx->gb.llme, ms_tlli, &raid2, ra_upd_req1, ARRAY_SIZE(ra_upd_req1)); /* we expect an RA update accept */ @@ -2013,7 +2013,7 @@ static void test_gmm_routing_areas(void) ms_tlli = gprs_tmsi2tlli(0x12345678, TLLI_FOREIGN); /* It is coming from RA 1 => ra_upd_req1 */ - send_0408_message(ctx->llme, ms_tlli, &raid2, + send_0408_message(ctx->gb.llme, ms_tlli, &raid2, ra_upd_req_other, ARRAY_SIZE(ra_upd_req_other)); /* we expect an RA update reject (and a LLC XID RESET) */ @@ -2051,7 +2051,7 @@ static void test_gmm_routing_areas(void) OSMO_ASSERT(ictx != NULL); OSMO_ASSERT(ictx == ctx); - send_0408_message(ctx->llme, ms_tlli, &raid2, + send_0408_message(ctx->gb.llme, ms_tlli, &raid2, attach_compl, ARRAY_SIZE(attach_compl)); /* we don't expect a response */ @@ -2064,7 +2064,7 @@ static void test_gmm_routing_areas(void) printf(" - RA Update Request (RA 2 -> RA 2)\n"); /* inject the RA update request */ - send_0408_message(ctx->llme, ms_tlli, &raid2, + send_0408_message(ctx->gb.llme, ms_tlli, &raid2, ra_upd_req2, ARRAY_SIZE(ra_upd_req2)); /* we expect an RA update accept */ @@ -2082,7 +2082,7 @@ static void test_gmm_routing_areas(void) /* inject the RA update complete */ ms_tlli = gprs_tmsi2tlli(ptmsi1, TLLI_LOCAL); - send_0408_message(ctx->llme, ms_tlli, &raid2, + send_0408_message(ctx->gb.llme, ms_tlli, &raid2, ra_upd_complete, ARRAY_SIZE(ra_upd_complete)); /* we don't expect a response */ @@ -2091,11 +2091,11 @@ static void test_gmm_routing_areas(void) OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL); OSMO_ASSERT(ctx->p_tmsi_old == 0); OSMO_ASSERT(ctx->p_tmsi == ptmsi1); - OSMO_ASSERT(ctx->tlli == ms_tlli); + OSMO_ASSERT(ctx->gb.tlli == ms_tlli); /* inject the detach */ - send_0408_message(ctx->llme, ms_tlli, &raid2, + send_0408_message(ctx->gb.llme, ms_tlli, &raid2, detach_req, ARRAY_SIZE(detach_req)); /* verify that things are gone */ |