diff options
-rw-r--r-- | include/osmocom/bsc/bts_ipaccess_nanobts_omlattr.h | 10 | ||||
-rw-r--r-- | src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c | 10 | ||||
-rw-r--r-- | src/osmo-bsc/nm_bts_fsm.c | 2 | ||||
-rw-r--r-- | src/osmo-bsc/nm_gprs_cell_fsm.c | 2 | ||||
-rw-r--r-- | src/osmo-bsc/nm_gprs_nse_fsm.c | 2 | ||||
-rw-r--r-- | src/osmo-bsc/nm_gprs_nsvc_fsm.c | 2 | ||||
-rw-r--r-- | src/osmo-bsc/nm_rcarrier_fsm.c | 2 | ||||
-rw-r--r-- | tests/nanobts_omlattr/nanobts_omlattr_test.c | 52 | ||||
-rw-r--r-- | tests/nanobts_omlattr/nanobts_omlattr_test.ok | 12 |
9 files changed, 47 insertions, 47 deletions
diff --git a/include/osmocom/bsc/bts_ipaccess_nanobts_omlattr.h b/include/osmocom/bsc/bts_ipaccess_nanobts_omlattr.h index 687f16a23..d6933fc75 100644 --- a/include/osmocom/bsc/bts_ipaccess_nanobts_omlattr.h +++ b/include/osmocom/bsc/bts_ipaccess_nanobts_omlattr.h @@ -28,9 +28,9 @@ struct gsm_bts_sm; struct gsm_bts; struct gsm_bts_trx; -struct msgb *nanobts_attr_bts_get(struct gsm_bts *bts); -struct msgb *nanobts_attr_nse_get(struct gsm_bts_sm *bts_sm); -struct msgb *nanobts_attr_cell_get(struct gsm_bts *bts); -struct msgb *nanobts_attr_nsvc_get(struct gsm_bts *bts); -struct msgb *nanobts_attr_radio_get(struct gsm_bts *bts, +struct msgb *nanobts_gen_set_bts_attr(struct gsm_bts *bts); +struct msgb *nanobts_gen_set_nse_attr(struct gsm_bts_sm *bts_sm); +struct msgb *nanobts_gen_set_cell_attr(struct gsm_bts *bts); +struct msgb *nanobts_gen_set_nsvc_attr(struct gsm_bts *bts); +struct msgb *nanobts_gen_set_radio_attr(struct gsm_bts *bts, struct gsm_bts_trx *trx); diff --git a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c index 517cfd38f..4f7a487b0 100644 --- a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c +++ b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c @@ -27,7 +27,7 @@ #include <osmocom/gsm/bts_features.h> /* 3GPP TS 52.021 section 8.6.1 Set BTS Attributes */ -struct msgb *nanobts_attr_bts_get(struct gsm_bts *bts) +struct msgb *nanobts_gen_set_bts_attr(struct gsm_bts *bts) { struct msgb *msgb; uint8_t buf[256]; @@ -108,7 +108,7 @@ struct msgb *nanobts_attr_bts_get(struct gsm_bts *bts) return msgb; } -struct msgb *nanobts_attr_nse_get(struct gsm_bts_sm *bts_sm) +struct msgb *nanobts_gen_set_nse_attr(struct gsm_bts_sm *bts_sm) { struct msgb *msgb; uint8_t buf[256]; @@ -147,7 +147,7 @@ struct msgb *nanobts_attr_nse_get(struct gsm_bts_sm *bts_sm) return msgb; } -struct msgb *nanobts_attr_cell_get(struct gsm_bts *bts) +struct msgb *nanobts_gen_set_cell_attr(struct gsm_bts *bts) { struct msgb *msgb; uint8_t buf[256]; @@ -206,7 +206,7 @@ struct msgb *nanobts_attr_cell_get(struct gsm_bts *bts) return msgb; } -struct msgb *nanobts_attr_nsvc_get(struct gsm_bts *bts) +struct msgb *nanobts_gen_set_nsvc_attr(struct gsm_bts *bts) { struct msgb *msgb; uint8_t buf[256]; @@ -251,7 +251,7 @@ struct msgb *nanobts_attr_nsvc_get(struct gsm_bts *bts) return msgb; } -struct msgb *nanobts_attr_radio_get(struct gsm_bts *bts, +struct msgb *nanobts_gen_set_radio_attr(struct gsm_bts *bts, struct gsm_bts_trx *trx) { struct msgb *msgb; diff --git a/src/osmo-bsc/nm_bts_fsm.c b/src/osmo-bsc/nm_bts_fsm.c index b9ed5a04e..bb4fe3e50 100644 --- a/src/osmo-bsc/nm_bts_fsm.c +++ b/src/osmo-bsc/nm_bts_fsm.c @@ -105,7 +105,7 @@ static void configure_loop(struct gsm_bts *bts, struct gsm_nm_state *state, bool if (bts->mo.get_attr_rep_received && !bts->mo.set_attr_sent && !bts->mo.set_attr_ack_received) { bts->mo.set_attr_sent = true; - msgb = nanobts_attr_bts_get(bts); + msgb = nanobts_gen_set_bts_attr(bts); abis_nm_set_bts_attr(bts, msgb->data, msgb->len); msgb_free(msgb); } diff --git a/src/osmo-bsc/nm_gprs_cell_fsm.c b/src/osmo-bsc/nm_gprs_cell_fsm.c index 4df3a3e94..b3f960c81 100644 --- a/src/osmo-bsc/nm_gprs_cell_fsm.c +++ b/src/osmo-bsc/nm_gprs_cell_fsm.c @@ -95,7 +95,7 @@ static void configure_loop(struct gsm_gprs_cell *cell, struct gsm_nm_state *stat if (!cell->mo.set_attr_sent && !cell->mo.set_attr_ack_received) { cell->mo.set_attr_sent = true; - msgb = nanobts_attr_cell_get(bts); + msgb = nanobts_gen_set_cell_attr(bts); OSMO_ASSERT(msgb); abis_nm_ipaccess_set_attr(bts, NM_OC_GPRS_CELL, bts->bts_nr, 0, 0xff, msgb->data, msgb->len); diff --git a/src/osmo-bsc/nm_gprs_nse_fsm.c b/src/osmo-bsc/nm_gprs_nse_fsm.c index 8a63f56e3..5994f3204 100644 --- a/src/osmo-bsc/nm_gprs_nse_fsm.c +++ b/src/osmo-bsc/nm_gprs_nse_fsm.c @@ -94,7 +94,7 @@ static void configure_loop(struct gsm_gprs_nse *nse, struct gsm_nm_state *state, if (!nse->mo.set_attr_sent && !nse->mo.set_attr_ack_received) { nse->mo.set_attr_sent = true; - msgb = nanobts_attr_nse_get(bts_sm); + msgb = nanobts_gen_set_nse_attr(bts_sm); abis_nm_ipaccess_set_attr(bts, NM_OC_GPRS_NSE, bts->bts_nr, 0xff, 0xff, msgb->data, msgb->len); diff --git a/src/osmo-bsc/nm_gprs_nsvc_fsm.c b/src/osmo-bsc/nm_gprs_nsvc_fsm.c index 5f0c5dee1..b11c2a639 100644 --- a/src/osmo-bsc/nm_gprs_nsvc_fsm.c +++ b/src/osmo-bsc/nm_gprs_nsvc_fsm.c @@ -107,7 +107,7 @@ static void configure_loop(struct gsm_gprs_nsvc *nsvc, struct gsm_nm_state *stat return; } nsvc->mo.set_attr_sent = true; - msgb = nanobts_attr_nsvc_get(nsvc->bts); + msgb = nanobts_gen_set_nsvc_attr(nsvc->bts); OSMO_ASSERT(msgb); abis_nm_ipaccess_set_attr(nsvc->bts, NM_OC_GPRS_NSVC, nsvc->bts->bts_nr, nsvc->id, 0xff, msgb->data, msgb->len); diff --git a/src/osmo-bsc/nm_rcarrier_fsm.c b/src/osmo-bsc/nm_rcarrier_fsm.c index b9e67c1bd..325ec5617 100644 --- a/src/osmo-bsc/nm_rcarrier_fsm.c +++ b/src/osmo-bsc/nm_rcarrier_fsm.c @@ -92,7 +92,7 @@ static void configure_loop(struct gsm_bts_trx *trx, struct gsm_nm_state *state, if (!trx->mo.set_attr_sent && !trx->mo.set_attr_ack_received) { trx->mo.set_attr_sent = true; - msgb = nanobts_attr_radio_get(trx->bts, trx); + msgb = nanobts_gen_set_radio_attr(trx->bts, trx); abis_nm_set_radio_attr(trx, msgb->data, msgb->len); msgb_free(msgb); } diff --git a/tests/nanobts_omlattr/nanobts_omlattr_test.c b/tests/nanobts_omlattr/nanobts_omlattr_test.c index ecf5f824b..32e2c5353 100644 --- a/tests/nanobts_omlattr/nanobts_omlattr_test.c +++ b/tests/nanobts_omlattr/nanobts_omlattr_test.c @@ -34,13 +34,13 @@ extern struct gsm_bts_model bts_model_nanobts; -static void test_nanobts_attr_bts_get(struct gsm_bts *bts, uint8_t *expected) +static void test_nanobts_gen_set_bts_attr(struct gsm_bts *bts, uint8_t *expected) { struct msgb *msgb; - printf("Testing nanobts_attr_bts_get()...\n"); + printf("Testing nanobts_gen_set_bts_attr()...\n"); - msgb = nanobts_attr_bts_get(bts); + msgb = nanobts_gen_set_bts_attr(bts); printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len)); printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len)); OSMO_ASSERT(msgb_eq_data_print(msgb, expected, msgb->len)); @@ -50,13 +50,13 @@ static void test_nanobts_attr_bts_get(struct gsm_bts *bts, uint8_t *expected) printf("\n"); } -static void test_nanobts_attr_nse_get(struct gsm_bts *bts, uint8_t *expected) +static void test_nanobts_gen_set_nse_attr(struct gsm_bts *bts, uint8_t *expected) { struct msgb *msgb; - printf("Testing nanobts_attr_nse_get()...\n"); + printf("Testing nanobts_gen_set_nse_attr()...\n"); - msgb = nanobts_attr_nse_get(bts->site_mgr); + msgb = nanobts_gen_set_nse_attr(bts->site_mgr); printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len)); printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len)); OSMO_ASSERT(msgb_eq_data_print(msgb, expected, msgb->len)); @@ -66,13 +66,13 @@ static void test_nanobts_attr_nse_get(struct gsm_bts *bts, uint8_t *expected) printf("\n"); } -static void test_nanobts_attr_cell_get(struct gsm_bts *bts, uint8_t *expected) +static void test_nanobts_gen_set_cell_attr(struct gsm_bts *bts, uint8_t *expected) { struct msgb *msgb; - printf("Testing nanobts_attr_cell_get()...\n"); + printf("Testing nanobts_gen_set_cell_attr()...\n"); - msgb = nanobts_attr_cell_get(bts); + msgb = nanobts_gen_set_cell_attr(bts); printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len)); printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len)); OSMO_ASSERT(msgb_eq_data_print(msgb, expected, msgb->len)); @@ -82,13 +82,13 @@ static void test_nanobts_attr_cell_get(struct gsm_bts *bts, uint8_t *expected) printf("\n"); } -static void test_nanobts_attr_nsvc_get(struct gsm_bts *bts, uint8_t *expected) +static void test_nanobts_gen_set_nsvc_attr(struct gsm_bts *bts, uint8_t *expected) { struct msgb *msgb; - printf("Testing nanobts_attr_nsvc_get()...\n"); + printf("Testing nanobts_gen_set_nsvc_attr()...\n"); - msgb = nanobts_attr_nsvc_get(bts); + msgb = nanobts_gen_set_nsvc_attr(bts); printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len)); printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len)); OSMO_ASSERT(msgb_eq_data_print(msgb, expected, msgb->len)); @@ -98,15 +98,15 @@ static void test_nanobts_attr_nsvc_get(struct gsm_bts *bts, uint8_t *expected) printf("\n"); } -static void test_nanobts_attr_radio_get(struct gsm_bts *bts, +static void test_nanobts_gen_set_radio_attr(struct gsm_bts *bts, struct gsm_bts_trx *trx, uint8_t *expected) { struct msgb *msgb; - printf("Testing nanobts_attr_nsvc_get()...\n"); + printf("Testing nanobts_gen_set_nsvc_attr()...\n"); - msgb = nanobts_attr_radio_get(bts, trx); + msgb = nanobts_gen_set_radio_attr(bts, trx); printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len)); printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len)); OSMO_ASSERT(msgb_eq_data_print(msgb, expected, msgb->len)); @@ -154,7 +154,7 @@ int main(int argc, char **argv) bts->network = net; trx = talloc_zero(ctx, struct gsm_bts_trx); - /* Parameters needed by nanobts_attr_bts_get() */ + /* Parameters needed by nanobts_gen_set_bts_attr() */ bts->rach_b_thresh = -1; bts->rach_ldavg_slots = -1; bts->c0->arfcn = 866; @@ -173,7 +173,7 @@ int main(int argc, char **argv) 0x01, 0x05, 0x39 }; - /* Parameters needed to test nanobts_attr_nse_get() */ + /* Parameters needed to test nanobts_gen_set_nse_attr() */ bts->site_mgr->gprs.nse.nsei = 101; uint8_t attr_nse_expected[] = { 0x9d, 0x00, 0x02, 0x00, 0x65, 0xa0, 0x00, 0x07, 0x03, 0x03, 0x03, @@ -182,7 +182,7 @@ int main(int argc, char **argv) 0x0a, 0x03, 0x0a, 0x03 }; - /* Parameters needed to test nanobts_attr_cell_get() */ + /* Parameters needed to test nanobts_gen_set_cell_attr() */ bts->gprs.rac = 0x00; bts->gprs.cell.bvci = 2; bts->gprs.mode = BTS_GPRS_GPRS; @@ -194,7 +194,7 @@ int main(int argc, char **argv) 0xfa, 0x00, 0xfa, 0x02 }; - /* Parameters needed to test nanobts_attr_nsvc_get() */ + /* Parameters needed to test nanobts_gen_set_nsvc_attr() */ struct osmo_sockaddr_str addr; osmo_sockaddr_str_from_str(&addr, "10.9.1.101", 23000); osmo_sockaddr_str_to_sockaddr(&addr, &bts->site_mgr->gprs.nsvc[0].remote.u.sas); @@ -205,7 +205,7 @@ int main(int argc, char **argv) 0x09, 0x01, 0x65, 0x5a, 0x3c }; - /* Parameters needed to test nanobts_attr_radio_get() */ + /* Parameters needed to test nanobts_gen_set_radio_attr() */ trx->arfcn = 866; trx->max_power_red = 22; bts->c0->max_power_red = 22; @@ -213,11 +213,11 @@ int main(int argc, char **argv) { 0x2d, 0x0b, 0x05, 0x00, 0x02, 0x03, 0x62 }; /* Run tests */ - test_nanobts_attr_bts_get(bts, attr_bts_expected); - test_nanobts_attr_nse_get(bts, attr_nse_expected); - test_nanobts_attr_cell_get(bts, attr_cell_expected); - test_nanobts_attr_nsvc_get(bts, attr_nscv_expected); - test_nanobts_attr_radio_get(bts, trx, attr_radio_expected); + test_nanobts_gen_set_bts_attr(bts, attr_bts_expected); + test_nanobts_gen_set_nse_attr(bts, attr_nse_expected); + test_nanobts_gen_set_cell_attr(bts, attr_cell_expected); + test_nanobts_gen_set_nsvc_attr(bts, attr_nscv_expected); + test_nanobts_gen_set_radio_attr(bts, trx, attr_radio_expected); /* NSVC IPv6 test */ struct osmo_sockaddr_str addr6; @@ -234,7 +234,7 @@ int main(int argc, char **argv) 0xfd, 0x00, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, }; - test_nanobts_attr_nsvc_get(bts, attr_nscv6_expected); + test_nanobts_gen_set_nsvc_attr(bts, attr_nscv6_expected); printf("Done\n"); diff --git a/tests/nanobts_omlattr/nanobts_omlattr_test.ok b/tests/nanobts_omlattr/nanobts_omlattr_test.ok index faeac7b38..b011ed462 100644 --- a/tests/nanobts_omlattr/nanobts_omlattr_test.ok +++ b/tests/nanobts_omlattr/nanobts_omlattr_test.ok @@ -1,29 +1,29 @@ -Testing nanobts_attr_bts_get()... +Testing nanobts_gen_set_bts_attr()... result= 19736d67615b5518060e00020120331e2424a83421a81f3f2500010a0c0a0b012a5a2b03e80a01230a080362093f99000700f11000010539 expected=19736d67615b5518060e00020120331e2424a83421a81f3f2500010a0c0a0b012a5a2b03e80a01230a080362093f99000700f11000010539 ok. -Testing nanobts_attr_nse_get()... +Testing nanobts_gen_set_nse_attr()... result= 9d00020065a00007030303031e030aa1000b03030303030a030a030a03 expected=9d00020065a00007030303031e030aa1000b03030303030a030a030a03 ok. -Testing nanobts_attr_cell_get()... +Testing nanobts_gen_set_cell_attr()... result= 9a0001009c000205039e00020002a30009140505a0050a04080fa800020f00a9000500fa00fa02 expected=9a0001009c000205039e00020002a30009140505a0050a04080fa800020f00a9000500fa00fa02 ok. -Testing nanobts_attr_nsvc_get()... +Testing nanobts_gen_set_nsvc_attr()... result= 9f00020065a2000859d80a0901655a3c expected=9f00020065a2000859d80a0901655a3c ok. -Testing nanobts_attr_nsvc_get()... +Testing nanobts_gen_set_nsvc_attr()... result= 2d0b0500020362 expected=2d0b0500020362 ok. -Testing nanobts_attr_nsvc_get()... +Testing nanobts_gen_set_nsvc_attr()... result= 9f00020065fd001629005a3c59e2fd005678901234567890123456789012 expected=9f00020065fd001629005a3c59e2fd005678901234567890123456789012 ok. |